A bizarre stoppage-time own goal from centre-back Gary Monk sunk Swansea at Sincil Bank.
The defender mistimed his attempt to clear a cross from Lincoln's Peter Gain. The ball spun off his boot and flew over his own head entering the net via the bar with keeper Willy Gueret left helpless.
The killer goal revived Lincoln's hopes of an automatic promotion spot and pushed the Swans back down to fourth place.
Lincoln had the better chances in the first half with Simon Yeo denied by a superb 16th minute save by Gueret.
Swansea struggled to find their form early on and relied on another excellent save from Gueret to keep them in the game when he pushed away a long-range shot from Richard Butcher.
Swansea should have gone in front two minutes before the half-time break when Lincoln keeper Alan Marriott fumbled a corner from Andy Robinson. The ball fell to Izzy Iriekpen but from six yards out the defender put his shot wide.
Swansea wasted two golden opportunities at the start of the second period. Almost straight from the restart Lee Trundle broke through only for Marriott to take the ball off his feet.
Marriott then made a glaring error when he threw the ball straight out to Swansea's Lee Thorpe but with an open goal the striker put the ball wide.
Iriekpen had another straightforward chance in the 54th minute when Lincoln failed to clear a Robinson free-kick, but from close range the big defender again failed to find the target.
As both teams looked for the breakthrough Yeo blasted in a first-time shot only for Gueret to make another diving save.
Swansea responded with a Trundle free-kick which curled round the wall but Marriott saved at his near post.
Lincoln had an excellent chance to score in the 88th minute when the Swansea defence was caught out by a deep cross from Kevin Sandwith. Gareth McAuley stole in unmarked at the far post but hit his shot straight at Gueret.