In the 21st minute Grabban claimed his first of the afternoon when he picked up the ball just outside the area, moved forward and fired home a drive struck so hard it brought loose the netting in the top corner.
Saves by Shrimps stopper Barry Roche from Ben Pringle, Grabban and Gareth Evans kept Morecambe in the hunt and in the 39th minute a quick break brought them an equaliser. Rotherham missed two chances to clear and Jordan Burrow fired home.
It took the Millers three minutes of the second half to restore their advantage. Gareth Evans beat his marker down the left and although his cross was headed clear the ball went straight to Jason Taylor who fired home from the edge of the box.
Rotherham were made to pay for their missed chances when Morecambe equalised from the penalty spot after 74 minutes. Ryan Cresswell was sent off for his second yellow card following a foul on Danny Carlton and Jack Redshaw scored from the spot.
But the hosts came back to win when Grabban netted his second of the afternoon with a wonder drive from 30 yards out in added time.