The Spireites booked their place in the next round after deservedly beating League One leaders Portsmouth 1-0 on Sunday afternoon. Tom Naylor headed the winner in the first-half against his old club.
Orient are 14th in League One. They beat Carlisle United 3-1 in the first round.
Town coach Danny Webb has connections with Orient, having been the assistant manager there when they promotion from the National league under the late Justin Edinburgh, who passed away in 2019 from a cardiac arrest, aged 49.
"It is a great tie for me personally,” Webb said.
"I thought I had a great relationship with their supporters.
"I have got nothing but fond memories of Leyton Orient.
"Justin Edinburgh, a good friend of mine, passed away and he taught me a lot about football. I will be thinking of him when the teams come out. It is a good draw.”