Krystian Pearce headed the Stags in front after just four minutes, but a clumsy challenge from keeper Conran Logan downed Harry Anderson with 15 minutes remaining, allowing John Akinde to convert from the penalty spot.
Lincoln are now six points clear of Bury in second spot in League 2, while Mansfield reclaimed third on goal difference.