The Exiles were 11 points adrift when they sacked boss Graham Westley but followed up a win over Crewe thanks to Ryan Bird's second half penalty.
County are now seven points from League Two safety and off the bottom of the table after Bird converted after Alex Whitmore fouled Alex Samuel.
Morecambe remain 15th.
Newport County boss Michael Flynn told BBC Radio Wales Sport: "It is not easy, but the boys were outstanding.
"We had enough chances to wrap up the game earlier, but the boys showed great character.
"We kept a clean sheet. I was very nervous, but tried not to show it.
"It's a brilliant win. We will keep fighting and we will keep scraping."
Match ends, Morecambe 0, Newport County 1.
Second Half ends, Morecambe 0, Newport County 1.
Foul by Michael Rose (Morecambe).
Jazzi Barnum-Bobb (Newport County) wins a free kick in the defensive half.
(Morecambe) wins a free kick in the defensive half.
Foul by Ryan Bird (Newport County).
Andrew Fleming (Morecambe) wins a free kick on the right wing.
Foul by Jazzi Barnum-Bobb (Newport County).
Foul by Michael Rose (Morecambe).
Ryan Bird (Newport County) wins a free kick on the right wing.
Attempt blocked. Alex Whitmore (Morecambe) right footed shot from outside the box is blocked.
Attempt missed. Rhys Turner (Morecambe) header from the right side of the box is close, but misses the top right corner.
Attempt saved. Aaron Williams (Newport County) right footed shot from the centre of the box is saved in the centre of the goal.
Substitution, Newport County. Aaron Williams replaces Alex Samuel because of an injury.
Attempt missed. Jazzi Barnum-Bobb (Newport County) right footed shot from the left side of the box is close, but misses to the right.
Attempt missed. Michael Rose (Morecambe) left footed shot from the centre of the box is close, but misses to the left.
Substitution, Newport County. Jazzi Barnum-Bobb replaces Mark O'Brien.
Corner,  Morecambe. Conceded by Joss Labadie.
Substitution, Morecambe. Peter Murphy replaces Antony Evans because of an injury.
Corner,  Morecambe. Conceded by Sid Nelson.
Mark O'Brien (Newport County) is shown the yellow card for a bad foul.
Corner,  Morecambe. Conceded by Tom Owen-Evans.
Michael Rose (Morecambe) wins a free kick in the defensive half.
Foul by Mark O'Brien (Newport County).
Foul by Ryan Edwards (Morecambe).
Scot Bennett (Newport County) wins a free kick in the defensive half.
Corner,  Morecambe. Conceded by Sid Nelson.
Delay over. They are ready to continue.
Delay in match Antony Evans (Morecambe) because of an injury.
Attempt saved. Lee Molyneux (Morecambe) right footed shot from the centre of the box is saved in the centre of the goal.
Substitution, Newport County. Mickey Demetriou replaces Sean Rigg.
Delay in match Alex Samuel (Newport County) because of an injury.
Substitution, Morecambe. Lee Molyneux replaces Kevin Ellison.
Goal!  Morecambe 0, Newport County 1. Ryan Bird (Newport County) converts the penalty with a right footed shot to the centre of the goal.
Penalty conceded by Alex Whitmore (Morecambe) after a foul in the penalty area.
Penalty Newport County. Alex Samuel draws a foul in the penalty area.
Attempt missed. Antony Evans (Morecambe) right footed shot from the centre of the box is close, but misses to the right.
Attempt saved. Sean Rigg (Newport County) left footed shot from the left side of the box is saved in the bottom left corner.
Attempt blocked. Joss Labadie (Newport County) right footed shot from outside the box is blocked.
Ryan Edwards (Morecambe) wins a free kick in the attacking half.
Newport County increased their hopes of avoiding League Two relegation by winning a second straight match under new boss Michael Flynn.