The misfiring Millers looked certain to crash to a huge cup shock after goals from Jamey Osborne, Alex Gudger and Jimmy Ball seemingly put the hosts in to the third round. But four goals in 15 minutes secured Paul Warne’s men a home tie against Hull City.
Freddie Ladapo and Michael Ihiekwe pulled two back before Smith hit two goals in three minutes to steal it.
The Millers got off to the worst possible start as the found themselves behind in the fifth minute.
Osborne took the ball down at the back post and fired home the opener for the National League side.
Gudger then raced in to the perfect place to bag Moors’s second as the visitors remonstrated with the officials for offside.
Warne brought on striker Michael Smith midway through the first half to try and grab the momentum, while defender Clark Robertson headed wide just before the break.
That and a bigger miss from Ladapo when unmarked came back to haunt the visitors as Ball hit the third just after the hour.
But Ladapo made no mistake when he bagged his fifth goal in three games 14 minutes from time before captain Ihiekwe blasted home three minutes later.
Smith levelled in the 88th minute when he headed home Ogbene’s cross before sparking scenes of jubilation with a second in stoppage time.
Solihull Moors: Boot, Vaughan, Howe, Gudger, Reckord, Ball, Storer, Gunning, Osborne (Wright, 89), McCallum (Bissett, 75), Beesley (Jones, 82). Unused substitutes: Rowley, Williams, Yussuf, Hawkridge.
Rotherham United: Iversen, Olosunde, Ihiekwe, Thompson, Robertson, Morris (Ogbene, 54), Barlaser (Crooks, 66), Wiles, Clarke (Smith, 26), Vassell, Ladapo. Unused substitutes: Price, Lindsay, Cooper, Hastie.
Referee: Carl Boyeson (Yorkshire).