John Akinde’s quick-fire brace, and Tyler Walker’s late header, sent the Millers out of the competition at Sincil Bank last night.
Victory would have seen Warne’s men qualify in place of local rivals Doncaster Rovers - who went through by just one goal on goal difference after Rotherham’s drubbing.
The Imps were gifted a penalty in the 12th minute when Matthew Olosunde fouled Tom Pett in the box.
Lewis Price was beaten as Akinde fired the spot kick down the middle.
And the deficit was doubled just two minutes later when Akinde latched onto Jorge Grant’s through ball to fire home via a deflection.
Millers’ striker Michael Smith saw his header denied by namesake Grant in the hosts’ net.
It was like deja vu ten minutes before the break with a Smith header was again kept out by the Imps’ stopper.
Price could only parry Harry Anderson’s cross into the path of Grant, but the veteran keeper made amends with a top close-range stop.
Record signing Freddie Lapado fizzed an effort wide from just outside of the box.
The Imps had chances to put the game beyond doubt, but substitute Jake Hesketh and Jack Payne both failed to test Price.
Daniel Barlaser had Smith scrambling across his line, before Price kept out Grant down the other end.
With eight minutes left Price pulled off a decent save to keep Payne’s strike out.
Substitute Walker added salt to the wounds when he nodded home Grant’s free-kick with three minutes left.
Price kept out Hesketh to deny Lincoln qualification, before Lapado was kept out.
Lincoln: Smith, Coker (Toffolo, 60), Connolly, Melbourne, Anderson, Chapman, Pett, Frecklington (Hesketh, 58), Payne (Walker, 82), Grant, Akinde.
Unused subs: Vickers, Eardley, Shackle, Adebayo-Smith.
Rotherham: Price, Olosunde, Cooper, Thompson (Robertson, 69), Hinds; Lamy (Ogbene, 58), Lindsay, Barlaser, Hastie (Morris, 69), Ladapo, Smith.
Unused subs: Iversen, Jones, Wiles, Crooks.
Referee: James Oldham (Derbyshire)
Attendance: 1,860 (137)