Andy Williams' rasping 25-yard shot saw Chesterfield relegated from League One after just one season.
The Spirites took the lead when Jordan Bowery turned the ball in off Mark Randall's cross past a passive defence.
Yeovil levelled when Dominic Blizzard passed into the net from deep inside the box after Andy Williams' assist.
Danny Whitaker's deflected shot put Chesterfield back in front before Keiran Agard slotted home and Williams struck from long range.
VIEWS FROM THE DRESSING ROOM
Chesterfield assistant manager Tommy Wright tells BBC Radio Sheffield:
"We're obviously disappointed, gutted. When we got the 2-1 lead I thought we were going to win the game.
"Two poor goals on our part have cost us dearly. I thought second half we were the better side, we created a lot of chances.
"But when you let people turn and shoot at goal, you're going to pay the consequences."
Yeovil 01 Walker 02 Ayling 04 Ngala 05 Huntington 17 Grounds 28 Hinds 06 Blizzard 14 D'Ath 07 A Williams 16 Franks 29 Obika (Agard - 6' ) Substitutes 24 Stewart 19 Haynes-Brown 11 Edgar 36 Brundle 18 Agard Chesterfield 01 Lee 03 Robertson 05 Thompson 12 Ridehalgh 25 Talbot 22 Juan (Whitaker - 46' ) 23 Randall 30 Moussa 09 Westcarr 16 Mendy (Boden - 79' ) 21 Bowery Substitutes 13 Fleming 04 Lowry 07 Allott 10 Whitaker 19 Boden