Matt Derbyshire twice came close to restoring parity, first when he charged down Forde's clearance, but was unlucky not to get the break.
Derbyshire then rose highest to meet Jack Hunt's cross, but could only plant his header inches wide of goal.
Two minutes after the restart, it was Derbyshire who teed up his side's equaliser when his cross was volleyed home by Daniel Ward.
Just after the hour mark, Hunt's powerful strike cannoned back off the post, with Forde well beaten, before Green's speculative volley from range flew well wide.
With little between the two sides and time running out, a draw seemed the most likely outcome until Kari Arnason popped up to head home Pringle's corner from inside the six yard box just minutes from the final whistle.
The result sees Rotherham move six points away from the Championship drop zone, but Millwall remain in trouble.