Moses Odubajo gave Orient the lead with a brilliant 25-yard volley before his low cross set up Dean Cox to tap home.
Alex Revell stabbed home from close range to make it 2-1, before levelling with a stunning 30-yard strike.
The victory was Rotherham manager Steve Evans's first at Wembley, having never managed a club at the national stadium before.
The dramatic shootout had followed an entertaining game, which saw both sides playing some decent attacking football.
It was Rotherham who kept ther nerve despite missing their first penalty. The normally reliable Chris Dagnall missed for Orient to send Rotherham up after a gap of nine years. The were relegated to League 1 back in 2005 after four seasons in the Championship.
With a brand new stadium this time and an energetic Chairman and Board they will be hoping to stay even longer this time around,