David Ferguson, Jordan Burrow, Joe Tait, Alex Harris and Wes York were on target at home to the North West Counties League’s bottom club.
It took fewer than two minutes for Ferguson to tap in the first from a low cross by striker Burrow, who then grabbed his first goal since a summer move from Gateshead when he followed up a saved attempt from Simon Heslop.
The Minstermen added two further efforts later in the first half with Tait heading in from Josh Law’s corner and former Hibernian attacker Harris celebrating his debut by netting after Burrow had hit a post, before York converted from Sean Newton’s cross just past the hour.
York’s win matched last term’s 5-0 thrashing of Bradford Park Avenue, with a 7-0 hammering of Kettering in December, 2011 the last heavier triumph.
In-form Guiseley warmed up for their league trip to the Minstermen at the weekend with a 4-0 success at rain-soaked Staveley Miners’ Welfare.
The Lions made it nine games unbeaten with Sean Smith’s effort followed by a second-half hat-trick from Kingsley James.
Guiseley joint-manager Russ O’Neill said: “It was another good performance by the side. The attitude of the players was key and once again they have all impressed.
“Getting through in the cup was important for us and now we can focus on the league again.”
Park Avenue prevailed 1-0 at Darlington after Danny Lowe settled matters midway through the first period.
Former Halifax attacker Dion Charles struck twice as Southport knocked out Farsley Celtic, with Devran Green also on target during a 3-0 away win after home defender Jack Higgins had headed the first-half’s best chance against the bar.
A fiery tie at Marine saw Frickley Athletic reduced to nine men as Connor Smith and Phillip Watt both received their marching orders.
Danny Mitchley’s goal straight after the restart won the game, but he also had two penalties saved by Athletic’s Daniel Wallis.
Knaresborough Town’s contest with Workington attracted a record Manse Lane crowd of 507, although Ben Cohen’s 86th-minute, deflected free-kick only proved a consolation after Conor Tinnion, Scott Allison, Jason Walker and Sam Joel had netted to earn the visitors a 4-1 win.
Barnsley match abandonment latest: See main section