Second-half goals from Rob Street and Dom Jefferies saw Lincoln City extend their unbeaten run to 18 and move top of League One.
Cardiff City now sit second, two points behind the Imps after losing at home for the first time since September.
A cagey first half saw both sides land blows at each other but no one could make the other side pay.
Lincoln were causing the Cardiff defence issues with Tom Hamer’s long throws and created a few half chances from them.
Cardiff came close on two occasions towards the end of the first half with both Ollie Tanner and Rubin Colwill going close.
Tanner attempted a curling shot from outside the box but Imps’ keeper George Wickens was able to tap it over.
R. Colwill also came close just moments but later but again Wickens kept his effort out.
Nothing separated the sides at the break but Michael Skubala’s side made Cardiff pay in the second 45.
Ben House did all the hard work to push the Imps forward and he was eventually able to pick out Street who kept his cool to find the bottom right corner of Nathan Trott’s goal.
Lincoln then added a second to seal the points 18 minutes later through former Cardiff academy prospect Dom Jefferies who like Street found the bottom right corner.
The goal from the 23-year-old rounded off a fine counter attacking move from Skubala’s side.
The Bluebirds had a few chances to make it a nervy end for the Imps but Rubin Colwill fired wide with 10 minutes to play before Callum Robinson’s effort was saved by Wickens.
The imps haven’t tasted second tier football since 1961 but today’s result has put within touching distance of a return, just 10 years on from finishing in mid table in the National League.
Both Cardiff and Lincoln are back in action on Tuesday night with the imps heading to Exeter and the Bluebirds heading north to Barnsley.
Despite the loss Cardiff are still in a very strong position to return to the Championship following relegation last year.
The Bluebirds hold a very big advantage over Bolton Wanderers in third with 11 games to play.
Lincoln picked up their 14th clean sheet of the season.
The Imps have an impressive league record over Cardiff winning seven of their last eight clashes with the Bluebirds.
27,280 were in attendance at Cardiff City Stadium, the highest league crowd since September 2023.
Cardiff City – 13. Nathan Trott, 2. Will Fish, 3. Joel Bagan, 4. Gabriel Osho (48. Dylan Lawlor 78′), 6. Ryan Wintle, 8. Omari Kellyman (16 Chris Willock 67′)., 10. Rubin Colwill (C), 11. Ollie Tanner (45. Cian Ashford 78′), 18. Alex Robertson, (14. David Turnbull 90′), 27. Joel Colwill (47. Callum Robinson 67′) , 44. Ronan Kpakio
Lincoln City -1. George Wickens, 2. Tendayi Darikwa (C), 3. Adam Reach, 6. Ryley Towler, 7. Reeco Hackett (16. Dom Jefferies 67′), 14. Connor McGrandles, 15. Sonny Bradley, 17. Rob Street (19.Alfie Lloyd 81′), 18. Ben House (8. Tom Bayliss 81′), 22. Tom Hamer, 24. Ivan Varfolomeev.