City manager Pep Guardiola was forced to turn to his bench as substitute Kevin De Bruyne scored the winner 11 minutes from time.
Jamie Donley's incredible long range lob had given the Orient an early lead.
And the hosts held the lead until 56 minutes when Rico Lewis' shot deflected in off teammate Abdukodir Khusanov to level the scores. City's new defender was credited with the goal - his first for the club.
Guardiola then threw on Phil Foden and De Bruyne in search for the winner and the latter struck late to help City avoid extra-time.
De Bruyne forced in Jack Grealish's pass to earn City's winner and avoid embarrassment for last season's beaten finalists.
City now look to Real Madrid as they prepare to welcome them to the Etihad in the Champions League play-off round on Tuesday.