His goal was well-deserved for Gudjon Thordarson's side, after an excellent start to the encounter. Disappointingly, they would not be able to maintain the standard of their performance during the first 10 minutes for the remaining 80.
Thordarson made two changes to the team that lost to Leyton Orient on New Year's Eve, with McMahon and Jake Sheridan both returning to the starting line-up.
Both Martin and Chris Palmer kept their places in the 5-3-2 system after their surprise starts at the weekend.
The main talking point among the home support though, was the worrying omission of star defender Kelvin Wilson.
The official line is that Wilson is injured, but with the January transfer window now upon us and the 20-year-old out of contract at the end of the season, that has not stopped tongues wagging.
The Magpies sprang out of the traps, showing no ill-effects from the defeats at Oxford and Orient over the festive period.
The lively Sheridan flashed a left-footed volley wide of the target, while Martin had already came close to breaking his County duck once, before succeeding in putting the Magpies ahead shortly after.
McMahon delivered the perfect set-piece from the left, which the 19-year-old glanced neatly over Ross Flitney in the Barnet goal.
County didn't rest on their laurels, with a neat piece of footwork from the immense David Pipe seeing the midfielder unleash a 25-yard shot that was well-held by Flitney.
Despite non-stop running from the lively Sheridan, the Magpies were understandably unable to keep to the same tempo, with Barnet beginning to press the Magpies deeper into their own half, quashing the home supporters' hopes of a rare goal-feast.
The Bees were to finish the half the stronger of the two teams, but despite fleeting pressure, they were unable to really test Kevin Pilkington in the home goal.
Half Time: Notts County 1-0 Barnet
Unlike in the first period though, the home side were unable to translate the possession into chances, with Pilkington's tip-over from a mis-hit cross the only save made in the opening 15 minutes of the second half.
Great link-up play between Needham and McMahon almost saw the left-sided player net his first Notts County goal, with the midfielder only denied by an excellent last-ditch saving tackle.
Gradually, it was looking increasingly likely that Barnet would take advantage of the Magpies unnecessary deep-lying system.
The visitors were let-down by the lack of a quality delivery from set-pieces, with numerous corners and free-kicks on the edge of the box wasted.
One such opportunity came-about after a handball from Chris Palmer, an offence that the Barnet players had insisted took place inside the penalty area.
Notts' efforts were largely restricted to counter-attacks, but it was from one such attack that the win should have been sealed with just 10 minutes remaining.
Steve Scoffham - on in place of Sheridan just moments before - broke free on the right before delivering the perfect cross onto the toe of strike partner Andy White.
Inexplicably, White failed to register any form of attempt on goal, treading on the ball which he seaked to control to the despair of the irate home faithful.
Shortly before, Martin missed out on making his day even better, narrowly firing a right-footed effort wide when 10 yards out.
Though Barnet continued to pressure the home defence throughout the final stages, Pilkington's goal was extremely well-protected by the excellent defensive trio of Brian O'Callaghan, Julien Baudet and goal-scorer Martin.
The very final moments of the match were dominated by an incident in-front of the Jimmy Sirrel Stand, as visiting full-back Damien Batt pushed-over a ballboy for not releasing the ball soon enough.
Batt received a mountain of warranted abuse from the home support for his trouble and it is expected that an official complaint will be lodged by the club.
The incident threatened to over-shadow the victory itself, as the young defender continued to be heckled by the Meadow Lane faithful until he was well down the tunnel.
Thordarson is unlikely to be too concerned over the incident though, with his team eventually holding out to record their second successive home victory.
Full Time: Notts County 1-0 Barnet
By no means a vintage performance, but Thordarson's team delivered a workmanlike display and now find themselves just two points off a playoff position.
It's not always been entertaining stuff under the Iceman, but with a record like that, who's going to argue that the Magpies manager hasn't made an excellent start to his rein?
With new signings expected before Saturday's visit of Darlington, Magpies fans will be hoping that 2006 will prove far superior to the year that has just left us.
Match Ratings to follow.