Chesterfield capitalised on Scunthorpe's draw on Monday and moved to the top of League Two with a convincing win at York.
The visitors scored after two minutes when Eoin Doyle collected Gary Roberts' through ball and found the top corner.
Home keeper Nick Pope saved from Roberts before Tommy Lee denied York's Lanre Oyebanjo.
Chesterfield doubled their lead with Dan Gardner teeing up Roberts, who slotted the ball home.
VIEWS FROM THE DRESSING ROOM
York manager Nigel Worthington told BBC Radio York:
"Two minutes into the game, we go a goal down and it puts you on the back foot. After that, we were second all over the park.
"Second goal - our corner, and they score. If you're not on your front foot, that's what happens and you pay the price.
"We found it difficult to pick it up and get it going and the quality of passing was less than average."
Chesterfield manager Paul Cook told BBC Radio Sheffield:
"We played well in the first half, we started the game really well, we were bright and we were a handful.
"We created chances and our movement was really good.
"I think the players should take all the credit tonight and the staff that work behind the scenes."
York City 31 Pope 02 Oyebanjo (Hayhurst - 55' Booked ) 03 Davies 15 Lowe 05 McGurk (Platt - 87' ) 16 McCombe 12 Carson 10 Penn 19 Bowman (Coulson - 74' ) 09 Fletcher 37 Reed Substitutes 07 Coulson 17 McDonald 18 Platt 20 Allan 24 Ingham 25 Dickinson 26 Hayhurst Chesterfield 01 Lee 07 Darikwa 15 Humphreys 12 Ryan Booked 06 Cooper 23 Evatt 26 Gardner (O'Shea - 58' ) 05 Morsy 17 Doyle 02 Banks (Richards - 60' ) 11 Roberts Booked (Hird - 74' ) Substitutes 03 Smith 04 Hird 08 Togwell 09 Richards 10 O'Shea 21 Gnanduillet 35 Dunbavin
Ref: Darren Bond