Goals in either half from Ben Wright and Dany N'Guessan helped ease Lincoln's relegation fears.
The home side went ahead when top scorer Wright headed in from close range on 15 minutes.
City's Alan Marriott appeared to carry the ball into his own net on 88 minutes but referee Clive Oliver ruled out the "goal" for a foul on the goalkeeper.
Lincoln then broke away in stoppage time, with Mark Stallard setting up N'Guessan for a simple goal.
Lincoln: Marriott, Green, Beevers, Brown, Ridley, John-Lewis (N'Guessan 84), Kerr, Hand, Dodds, Forrester (Smith 90), Wright (Stallard 67).
Subs Not Used: Duffy, Hone.
Goals: Wright 15, N'Guessan 90.
Dag & Red: Thompson, Foster , Uddin, Boardman, Griffiths, Saunders, Huke (Taiwo 62), Southam, Sloma (Taylor 58), Strevens, Nurse (Hall 58).
Subs Not Used: Hogan, Smith.
Ref: Clive Oliver (Northumberland).