Nicholls’ emphatic finish with 11 minutes remaining gave Barnet three points and leaves the Shrimps needing a draw at Coventry City this time next week to be sure of beating the drop.
It was a win which Barnet deserved for their second-half showing against a Morecambe side which looked set for the point they needed at half-time, only to fade badly in the second half.
The Shrimps named an unchanged starting XI and bench from that which drew against Cambridge United in midweek for a match in which the stakes were high for both sides.
Perhaps for that reason, the opening 45 minutes were scrappy with misplaced passes and long balls aplenty.
It was a half where neither side could be faulted for their endeavour but their execution left a lot to be desired.
In Morecambe’s case, they dealt admirably with the visitors’ long ball tactic but, going the other way, they let themselves down too often in the final third.
One early counter-attack saw three Morecambe attackers facing two Barnet defenders, only for the final ball to be lacking.
That was also the case when Adam Campbell burst down the right-hand side but his ball across to Callum Lang was just behind the striker.
Alex Kenyon’s header was comfortably held by Barnet keeper Craig Ross with efforts on goal proving to be at a premium.
At the other end, Barnet full-back Richard Brindley fired a shot across the face of goal and wide, while Shaq Coulthirst had a deflected effort easily collected by Barry Roche.
They weren’t helped by an early change which saw Simeon Akinola stretchered off after prolonged treatment on the sidelines but Morecambe seemed pretty comfortable at the break.
That relative comfort disappeared in the second half as Barnet began to throw everything – including the proverbial kitchen sink – at Jim Bentley’s players.
Roche pushed away John Akinde’s shot, narrowed the angle to keep out Nicholls’ effort and made a more comfortable stop from Brindley’s free-kick.
Dan Sweeney also flicked a header over and Brindley sent another free-kick over the bar as Barnet desperately sought the goal they needed.
It duly arrived when Nicholls clinically fired beyond Roche – and should have been followed by a second moments later.
This time, Akinde got behind the defence but saw his shot kept out by the onrushing Roche.
In contrast, Morecambe toiled going forward as they played just as many long balls in the second half as Barnet did in the first.
Consequently, chances were scarce with Ross doing well to keep out Lang’s attempt, while Kenyon and Michael Rose both had efforts off target.
In desperation, the Shrimps pushed Steve Old forward but, despite five added minutes, it was a tactic which singularly failed to pay off and leaves their Football League status in the balance.
Morecambe: Roche, McGowan, Lavelle, Old, Conlan, Kenyon, Rose, Campbell (Wylde 55), Lang, Ellison, McGurk (Oliver 73). Subs not used: Nizic, Fleming, Wildig, Lund, Muller.
Barnet: Ross, Brindley, Santos, Nelson (Watson 76), Tutonda, Akpa Akpro, Weston, Sweeney, Akinola (Nicholls 32), Akinde, Coulthirst (Taylor 70). Subs not used: Legge, Clough, Bover, Payne.
Referee: Geoff Eltringham.