Lincoln stretched their local derby bragging rights over the Stags at Field Mill to six years and bounced back in style from conceding eight goals in their opening two games.
City caught the home side on the break on three occasions and finished in devastating fashion to secure their first points of the season.
Lincoln almost conceded a goal in the first minute when John McAliskey somehow failed to poke in a Matt Hamshaw free-kick at the far post.
That miss proved crucial 30 seconds later when from Alan Marriott's long clearance Louis Dodds struck a low 16-yard drive into the bottom corner.
Defender Martin McIntosh, on his home league debut, saw a dipping 25-yard free-kick tipped over by keeper Marriott.
Then the experienced centre half, leading the home recovery, also saw a low 30-yard drive held at the second attempt by the sprawling keeper.
Marriott also did well to hold on to a Stephen Dawson finish after a flowing cross-field move involving Lee Bell and Hamshaw.
As the Stags piled on the pressure in search of an equaliser, Martin drove narrowly over from 20 yards after more good attacking work from McIntosh.
On a rare Lincoln attack the defender almost got on the score sheet at the other end, nodding Ryan Amoo's cross inches wide of his own goal.
But the Imps then gifted the Stags a lifeline, Paul Green nudging Michael Boulding off the ball and the striker converted the 36th minute penalty.
However, straight from the kick-off Lincoln regained the lead with the Stags still celebrating. Dany N'Guessan's driven low cross-shot deflected into the net off the legs of McIntosh.
Lincoln made the game safe with Mark Stallard curling a delightful 25-yard shot into the net in the 54th minute that deflected in off McIntosh and finally being awarded as an own goal.