Regan Poole scored his first goal for the Imps to seal three points as City put in an impressive performance against Charlton Athletic.
Poole’s stoppage-time winner was the least the home side deserved after creating a string of chances against the expensively-assembled side from London.
A good first-half display was not rewarded with any goals, but an own goal from Jayden Stockley put the Imps ahead before Sam Lavelle levelled. In the end Poole sparked celebratory scenes in time added on when he headed home.
The win moves Michael Appleton's men up to 13th in the table, and with players returning from injury will be looking to climb into the top half.
The Imps were the first to threaten in the match, with just four minutes on the clock when Chris Maguire intercepted a clearance from the visiting goalkeeper Craig MacGillivray. He fed Anthony Scully who cut inside and saw his effort blocked.
Jonathan Leko fired a low effort wide for the visitors after eight minutes, as the Addicks were setup to contain the Imps and try to threaten on the counter-attack. Joe Walsh - making his first league start of the season after recovering from injury - also stopped Eliot Lee with a great tackle as the visitors threatened after winning the ball back on the halfway line.
That made for a cagey opening period, but the home side really grew into the game. Right-back Poole was allowed the freedom to play in a very attacking role, providing a great first-time pass to play Scully into a good shooting position after 21 minutes - with the Irishman firing his effort low and just wide at the near post.
He was close to playing in Maguire moments later, with only a great interception stopping the ball finding the Imps’ No.10.
Lasse Sorensen, collecting a pass from Maguire, went close with a chipped effort as the game reached the half-hour mark - the ball landed on the roof of the net, with MacGillivray left helpless.
The Imps won several corners, though the closest they went to scoring from one was when Joe Walsh slid in at the far post but sent the ball just wide. Jamie Robson tried an effort from distance which was too high, while Lewis Fiorini could not get enough direction on a flicked header and did not trouble MacGillivray.
There were no changes from either side at the interval, and the home side started the second period as they had finished the first.
Sorensen thought he had won a corner after smartly flicking the ball off a defender, only for referee David Webb to signal a goal-kick.
And Papa Souare almost sliced a Scully cross into his own net after 51 minutes, managing to send the ball away from goal when it could easily have ended up anywhere.
They went ahead after 58 minutes. Ted Bishop’s cross from the right was not dealt with by MacGillivray, who - under pressure from the lurking Scully - punched the ball onto Stockley and saw it end up in the back of his own net.
The lead did not last long, however, with Lavelle poking the ball home from a corner just three minutes later.
The game was strongly-contested, with the home bench surprised not to be awarded a free-kick after Jamie Robson was fouled just outside the area and Harry Arter - who had already been booked - escaping without further punishment despite catching McGrandles with a late challenge.
MacGillivray had to be at his best to keep out a Scully after after 76 minutes, after he collected an incisive pass from Robson.
And Maguire fired a powerful effort wide after a great touch to find space as the home side continued to push to regain the lead.
A great move down the right started by Maguire saw him find Scully, who fed Sorensen. The Dane did brilliantly to take the ball down and try to get to the byline, only to be squeezed out.
The chances came thick and fast as the game entered the final 10 minutes, with Fiorini and Sorensen trying efforts from just outside the area but neither were able to trouble MacGillivray.
The Imps thought they had claimed the points with two minutes to go when Scully headed home Fiorini’s cross, only for the assistant’s flag to cut celebrations short
The deserved winning goal did come, though. It was a late one as Poole headed home from close range after Chris Maguire’s left-wing delivery.
Attendance: 9,169 (1,355 away)