A Kabongo Tshimanga hat-trick and a Gavin Gunning free-kick was enough to give the Spireites a 4-2 victory at the Technique Stadium on what turned out to be a very nervy Tuesday night.
Chesterfield got off to the perfect start. Jeff King's floated corner was headed back across goal by Gunning; the ball fell to Tshimanga, who tapped home from a few yards.
The lead was doubled in the ninth minute. Stefan Payne was brought down in the area by Ben Richardson-Everton. Tshimanga took responsibility and dispatched his penalty to take his tally to five for the season.
Barnet seemed shell-shocked and Kian Flanagan's tame long-range effort was the closest they came in the opening exchanges.
James Rowe's side were looking like running away from the game. Saidou Khan latched onto a ball over the top of the visitors backline. He rounded Sam Sargeant before firing into the side-netting.
The tempo of the football slowed down as the half came to an end with the Spireites seemingly going in with a two-goal lead.
However, the Bees reduced arrears right at the start of the three added minutes. Serhat Tasdemir tried his luck from range and found the back of the net via a massive deflection.
The goal startled the Blues and they were rocked a couple of minutes later. Sam Granville fired a goalbound effort from 20-yards that again deflected past Scott Loach to provide an unlikely equaliser.
Chesterfield came out for the second half and struggled to find the free-flowing football that lit up the Technique Stadium in the first half.
The home side were given a chance to take the lead once more in the 64th minute. King was upended in the area and referee Andrew Miller pointed to spot for the second time. Tshimanga assumed responsibility again and slotted the spot-kick home down the middle for his first hat-trick for the club.
Payne, who really impressed in his home debut, thought he had restored the Spireites two-goal lead when he smashed the ball home from close-range. However, the linesman's flag stopped the celebrations after the striker had strayed offside.
A goal wasn't far off though and the home side put the game beyond all doubt in the 77th minute. Gunning curled his 30-yard free-kick beyond Sargeant via deflection off the Barnet wall.
Substitute Ephron Mason-Clark tried his best to get the visitors back into the game, but his low shot forced Loach into a fingertip save.
The final whistle blew soon after securing Chesterfield's fourth win of the season and moved the Blues up to second in the National League table.
Chesterfield: Loach; King, Kerr, Gunning, Grimes, Miller (Whittle 75); Oyeleke, Weston (McCourt 79), Khan (Mandeville 61); Payne, Tshimanga.
Unused Substitutes: Carline, Rowe.
Attendance: 4,538 (49 away)
Commentaires