Holmes grabbed a hat-trick with all of his goals gifted to him by the home defence's inability to cut out crosses.
Lincoln, who have the worst home defensive record in League Two, simply fell apart when they were put under pressure by promotion chasing United.
Lincoln had a let-off after only five minutes when Millers midfielder Mark Hudson was left unmarked inside the box but hit the post when it looked easier to score.
City went straight on to the attack with Ben Wright forcing his way through. The striker lifted his shot over keeper Andy Warrington only to see the ball strike the woodwork.
Four minutes later Rotherham attacked again and Lincoln had a real let-off when their defender Lee Ridley lifted an attempted clearance over his own keeper but was saved by the bar.
Rotherham's Ryan Taylor missed another chance early in the second half before Lincoln grabbed an equaliser out of nothing in the 55th minute.
Millers skipper Graham Coughlan headed a clearance over his own keeper leaving Jamie Forrester to fire into the empty net from an acute angle.
But Rotherham then took over and could have won by more than their two-goal margin.
United were back in front in the 57th minute when the static Lincoln defence allowed Holmes a free header and he buried the ball in the net.
Another Lincoln defensive mistake let in Marc Joseph but the Rotherham player was denied by a one-handed reaction save from keeper Alan Marriott.
Holmes completed his hat-trick six minutes from time when he was left unmarked to side-foot home a cross from Pablo Mills.