Nicky Bailey, Dwaine Lee, Ismail Yakubu and Dean Sinclair all found the target as Barnet scored an easy win to maintain their Conference lead.
Bailey opened the scoring in the 16th minute after heading home a Richard Graham cross from the left flank.
Lee stretched that lead with a low left-foot drive 20 minutes later, before Yakubu made it three in the second half.
The rout was completed by Sinclair when he finished neatly from six yards out.
Barnet: Tynan, Hendon, Yakubu, King, Clist, Bailey,
Lee (Lopez 82), Sinclair (Batt 78), Graham, Roache (McBean 76),Strevens.
Subs Not Used: Millard, Maddix.
Goals: Bailey 16, Lee 36, Yakubu 65, Sinclair 74.
York: Stockdale, Brass, Pearson (Smith 78), Davies, Merris, Coad (Haw 73), Groves, Dunning, Stewart, Bishop, Robinson (Yalcin 19). Subs Not Used: Porter, Arthur.
Booked: Dunning.
Att: 2,501
Ref: R Shoebridge (Ripley).