A late penalty from Barnet midfielder Mark Byrne condemned Chesterfield to defeat in Paul Cook's first game in charge of the Spireites.
Byrne coolly sent Chesterfield keeper Richard O'Donnell the wrong way after Drew Talbot had tripped Andy Yiadom.
Bees goalkeeper Graham Stack had kept his side in the game in the first half with a string of saves.
He denied Danny Whitaker and Sam Togwell before pulling off a double save from Jack Lester.
Barnet remain bottom of League Two but are now two points from safety after a second win in three games.
VIEWS FROM THE DRESSING ROOM
Chesterfield manager Paul Cook told BBC Radio Sheffield:
"Obviously we're very disappointed to lose. Anytime you play a football game and lose, you can't be happy.
"There's things in a game that go well for you and go against you, but it's important to do the right work during the week.
"Performances like that won't be accepted. It's important the lads cop onto the fact that we're a big club in this division."
Barnet joint-head coach Mark Robson tells BBC London 94.9:
"We held on in the second half and rode our luck a little bit.
"Credit to the boys because they dug in and they made it really difficult for Chesterfield.
"I think we limited them to very few opportunities and we defended stoutly throughout.
"It wasn't our best performance but to come away with the result is superb."
Live Text Commentary
Full Time The game is over, as the referee blows his whistle.90:00 +4:55
The official flags Jack Lester offside. Indirect free kick taken by Graham Stack.90:00 +2:52
Unfair challenge on Barry Fuller by Liam Ridehalgh results in a free kick. Barry Fuller restarts play with the free kick.90:00 +1:17
Shot by Craig Westcarr from 12 yards. Save made by Graham Stack.89:20 Goal scored
Goal! - Mark Byrne - Chesterfld 0 - 1 Barnet Mark Byrne scores a power penalty. Chesterfield 0-1 Barnet.88:25
Drew Talbot gives away a Penalty for an unfair challenge on Andrew Yiadom.86:50
Unfair challenge on Terrell Forbes by Andrew Yiadom results in a free kick. Free kick taken by Richard O'Donnell.83:00
Inswinging corner taken by Chris Atkinson from the left by-line, Clovis Kamdjo manages to make a clearance.82:06 Substitution
Substitution Jake Hyde leaves the field to be replaced by Jonathan Nurse.81:26
Andrew Yiadom fouled by Danny Whitaker, the ref awards a free kick. Graham Stack takes the free kick.81:10
Inswinging corner taken from the right by-line by Chris Atkinson, clearance by David Stephens.80:39
The ball is crossed by Liam Ridehalgh, blocked by David Stephens.77:18
Chris Atkinson produces a right-footed shot from just outside the box that goes wide right of the goal.76:16 Substitution
Substitution Micah Evans replaces Tendayi Darikwa.73:54 Substitution
Substitution Craig Westcarr joins the action as a substitute, replacing Sam Togwell.70:56
The assistant referee flags for offside against Jack Lester. Free kick taken by Graham Stack.70:28
Free kick awarded for an unfair challenge on Mark Randall by Jake Hyde. Terrell Forbes restarts play with the free kick.69:04
Mark Byrne restarts play with the free kick.69:04 Substitution
Substitution (Barnet) makes a substitution, with Olly Lee coming on for Anthony Edgar.69:04
Unfair challenge on Andrew Yiadom by Tendayi Darikwa results in a free kick.
Booking Edgar Davids booked.64:23
Tendayi Darikwa fouled by Edgar Davids, the ref awards a free kick. Terrell Forbes restarts play with the free kick.60:57 Substitution
Substitution Mark Randall on for Nathan Smith.60:13
Short corner worked by Danny Whitaker.59:14
Corner taken by Danny Whitaker from the left by-line. Inswinging corner taken right-footed by Danny Whitaker from the left by-line.58:16
Andrew Yiadom takes a shot. Sam Hird gets a block in.56:40
Free kick taken by Barry Fuller.56:40 Booking
Booking Booking for Sam Hird.56:26
Sam Hird gives away a free kick for an unfair challenge on Jake Hyde.48:21
Edgar Davids challenges Jack Lester unfairly and gives away a free kick. Sam Togwell takes the direct free kick.48:00
Anthony Edgar fouled by Drew Talbot, the ref awards a free kick. Jordan Brown takes the free kick.45:01
The second half has started.45:00 +2:15 Half time
Half Time The ref blows to end the first period.44:48
Inswinging corner taken by Mark Byrne from the left by-line.43:52
Jack Lester concedes a free kick for a foul on Graham Stack. Graham Stack restarts play with the free kick.42:10
The ball is crossed by Danny Whitaker, Jack Lester takes a shot. Save made by Graham Stack.40:59
Inswinging corner taken from the right by-line by Danny Whitaker.40:37
Corner taken by Danny Whitaker.39:48
Inswinging corner taken by Mark Byrne from the right by-line, Terrell Forbes makes a clearance.39:17
Effort on goal by Mark Byrne from 20 yards. Save made by Richard O'Donnell.38:49
Jordan Brown sends in a cross, Terrell Forbes makes a clearance.37:44
Inswinging corner taken by Danny Whitaker from the right by-line, Sam Hird has an effort at goal from deep inside the area missing to the left of the goal.36:36
The assistant referee signals for offside against Jake Hyde. Indirect free kick taken by Richard O'Donnell.34:50
Inswinging corner taken by Danny Whitaker from the right by-line. Sam Togwell takes a shot. Save made by Graham Stack. Short corner taken by Danny Whitaker.34:18
Danny Whitaker takes a shot. Save made by Graham Stack.33:54
Tendayi Darikwa sends in a cross.27:25
Free kick awarded for an unfair challenge on David Stephens by Sam Hird. Free kick taken by Clovis Kamdjo.26:57
David Stephens challenges Jack Lester unfairly and gives away a free kick. Indirect free kick taken by Drew Talbot.25:47
Mark Byrne takes the inswinging corner, Headed effort from deep inside the penalty area by Jake Hyde goes harmlessly over the crossbar.24:50
Tendayi Darikwa challenges Clovis Kamdjo unfairly and gives away a free kick. Free kick taken by David Stephens.19:52
The free kick is swung in right-footed by Danny Whitaker, Sam Hird makes a clearance. Outswinging corner taken right-footed by Mark Byrne from the right by-line, clearance by Liam Ridehalgh.19:52 Substitution
Substitution Anthony Edgar is brought on as a substitute for John Oster.19:52
Foul by Jordan Brown on Tendayi Darikwa, free kick awarded.19:18
Jordan Brown takes a shot. Richard O'Donnell makes a save.18:04
Effort from inside the area by Tendayi Darikwa misses to the left of the goal.16:11
Jack Lester produces a curled right-footed shot from deep inside the penalty area which goes wide of the right-hand post.15:52
Unfair challenge on Tendayi Darikwa by Jordan Brown results in a free kick. Indirect free kick taken by Danny Whitaker.13:42
Jake Hyde concedes a free kick for a foul on Sam Hird. Indirect free kick taken by Sam Hird.12:19
The referee blows for offside. Free kick taken by Graham Stack.10:36
John Oster takes the inswinging corner, Header on goal by Krystian Pearce from inside the box goes harmlessly over the target.9:33
Free kick awarded for a foul by Nathan Smith on Barry Fuller. John Oster delivers the ball from the free kick right-footed from right channel, clearance by Terrell Forbes.7:57
Jack Lester has a shot on goal from outside the box which misses right.6:26
Clovis Kamdjo challenges Jack Lester unfairly and gives away a free kick. Terrell Forbes takes the direct free kick.4:03
Clovis Kamdjo takes a shot. Richard O'Donnell makes a save.3:01
John Oster fouled by Sam Togwell, the ref awards a free kick. John Oster takes the indirect free kick.0:00
The referee gets the game underway.
Live data and text provided by our data suppliers