Visiting captain George Glendon reduced the deficit for the National League North side, but it is the Minstermen who now go on to entertain 2013 Cup winners Wigan in a televised Friday night clash on December 1.
York started with purpose as Dipo Akinyemi fired past the near post just six seconds into the contest before John-Lewis opened the scoring in the fifth minute.
Poor away defending saw John-Lewis afforded the space to collect Scott Burgess’ right-wing corner at the near post before turning and firing past an exposed Will Stanway from two yards.
Chester only managed one effort during the opening 45 minutes, with David Stockdale keeping out a diagonal Adam Thomas drive.
After the break, ex-York midfielder Elliott Whitehouse stabbed wide of a gaping goal following a goalmouth scramble.
But the Minstermen doubled their advantage midway through the second period when Stanway misjudged a bouncing ball, leaving John-Lewis with an empty net to grab his second goal of the night.
The visitors rallied, though, with Declan Weeks forcing a fine save from Stockdale before Glendon went on to grab his team’s consolation, beating the ex-Fulham keeper with a composed 10-yard finish after 71 minutes.
Scarborough Athletic saw their hopes of reaching the second round when they were beaten 5-2 at Forest Green.
Goals from Teddy Jenks, Kyle McAllister, Jamie Robson, Harvey Bunker and Tyrese Omotoye completed the win for the League Two strugglers.
The hosts took the lead in the fifth minute after a cross from Fankaty Dabo found its way to Jenks and his deflected effort went past Ryan Whitley in the Scarborough goal.
Troy Deeney won a penalty in the 18th minute which was converted into the top-right corner by McAllister.
Rovers went 3-0 ahead in the 30th minute when Robson tapped into an empty net.
It was 4-0 after 34 minutes as Bunker found the back of the net from a corner routine.
Scarborough got a goal back in the 41st minute through an effort from Alex Wiles that was out of reach for home goalkeeper James Belshaw.
Omotoye added a fifth in the 76th minute with a left-footed shot into the bottom corner before Michael Coulson grabbed a late consolation for the visitors.