Leyton Orient lost 4-3 on penalties after throwing away a two-goal lead against Rotherham to miss out on promotion to the Championship.
Moses Odubajo handed Orient the lead ten minutes before the break and then turned provider for Dean Cox, who doubled the O's advantage from close-range.
Ten minutes into the second-half, former Orient forward Alex Revell pulled one back for the Millers. Revell then doubled up, equalising for Rotherham with a strike from distance.
Orient shaded extra-time but could not find a way past Adam Collin in the Rotherham goal.
Collin proved to be the Millers' hero, denying Mathieu Baudry and substitute Chris Dagnall from 12 yards to help the Yorkshire side into the Championship.
Russell Slade named an unchanged starting line-up from the semi-final second leg win over Peterborough United, with Lloyd James retaining his place in the centre of midfield at the expense of John Lundstram.
Rotherham boss Steve Evans also selected an unchanged starting line-up following United's semi-final win over Preston.
The Millers had a strong claim for a penalty after just four minutes when O's captain Nathan Clarke appeared to barge Revell to the floor off the ball. Referee David Coote disagreed though - to the relief of Clarke.
Orient responded by carving out their first chance of the opening exchanges, David Mooney just over-hitting a return pass into the path of strike partner Kevin Lisbie as he burst into the 18-yard box.
Rotherham nearly benefitted from some hesitancy at the back shortly after, but Jamie Jones atoned for his indecision.
Craig Morgan helped a deep free-kick back across the face of goal where Wes Thomas got the better of Jones to prod the ball into the path of Revell, who was unable to steer beyond the O's goalkeeper.
In the 14th minute, Odubajo escaped down the right-hand side following a quick free-kick but his cross sailed just over the head of Mooney, who was unable to connect with the delivery from a central position.
James Tavernier tried his luck from 25 yards a couple of minutes later, Jones gathering the full-back's shot from distance at the second attempt.
Just before the half-hour mark, Orient came as close as they had until that point though top-scorer Mooney.
Lisbie knocked a long ball down for Cox, who - under close attention - hooked the ball into Mooney's path for the Irishman to volley against the side-netting from an acute angle.
Ten minutes before the break, Odubajo handed the O's the lead in with a thunderbolt from his left foot.
A free-kick on the left-hand touchline was knocked down to Odubajo on the edge of the area and the winger controlled before instinctively rifling a powerful left-footed volley past a shell-shocked Collin.
Four minutes later Orient were in dreamland as Odubajo turned provider for Cox to double the O's lead - the 250th goal in Football League play-off final.
Tavernier inadvertently headed the ball out to Odubajo on the right and the winger made enough room to pull the ball across the six yard box for an unmarked Cox to side-foot home.
Ben Pringle nearly dragged the Millers back into the contest in first-half injury-time, sending a 35-yard half-volley whistling narrowly over Jones' crossbar.
Five minutes after the restart, Rotherham had the first chance of the second period, Tavernier curling a free-kick narrowly over from 20 yards.
Pringle then tried his luck from a similar position on the opposite side of the penalty area, bending comfortably over once more.
From the latest in a succession of United free-kicks, Orient were finally made to pay for their indiscipline.
Tavernier whipped in a free-kick from the right which Jones failed to connect with. The ball bounced off of Romain Vincelot and into the path of Revell who stuck out a leg to divert into the empty net.
The momentum had all been with the Millers, who had been camped in the O's half since the re-start and that pressure soon told.
Just five minutes after getting his first, Revell stuck the knife into his former side to drag the Millers level.
A long ball forward was only headed up in the air by Clarke before Revell took one touch to control lobbed an audacious half-volley beyond the despairing dive of Jones from 35 yards.
With 12 minutes remaining and the prospect of extra-time looming, James swung in a cross from the right, which had any one of Mooney, Baudry or Dagnall connected with, would surely have restored the O's lead.
Rotherham's top-scorer, Kieran Agard - who had been quiet all afternoon - should have tested Jones in the 84th minute, but instead blasted over after seizing on Baudry's attempted clearance.
Agard wasted another good chance in the 90th minute, heading Lee Frecklington's centre comfortably wide at the near post.
Six minutes into the first period of extra time, Scott Cuthbert drew the best from Jones, who was alert to push away the Scot's header towards his own goal.
From the resulting corner Orient broke, Mooney feeding Dagnall but the substitute was denied by an alert Collin.
A free-kick on the right-hand side of the penalty area presented a good opportunity to deliver after Batt had been hauled down by Robert Milsom.
James delivered the set-piece but O's skipper Clarke connected poorly and flashed his header wide.
The first chance of the second half of extra-time fell the way of Orient. Batt picked out the run of Dagnall, who tried to get the ball back onto his right foot to shoot, eventually losing possession as a result of his hesitation.
Orient had been on top in extra-time but could not make the territorial supremacy pay; James denied on the line after a long throw from the left.
With neither side making the breakthrough in extra-time, penalties were required to determine who would compete in the second tier next season.
Rotherham were first to take - in front of the Orient supporters - and got off to the ideal start when Agard converted.
Advantage was then handed to the O's when Frecklington - who had been hobbling towards the end of extra-time - was brilliantly denied by Jones low to his right with the Millers' second kick.
The pendulum then swung back in Rotherham's favour as Baudry saw his kick blocked by Collin to his left.
Middlesbrough loanee Richie Smallwood converted United's fifth before Collin parried away Dagnall's penalty to send Rotherham into the second tier.
Leyton Orient: Jones; Cuthbert, Baudry, Clarke (c), Omozusi; Odubajo, Vincelot, James, Cox (Batt 74); Lisbie (Dagnall 76), Mooney (Lundstram 105).
Unused: Larkins (GK), Sawyer, Bartley, Simpson.
Rotherham United: Collin; Tavernier, Morgan (c), Arnason, Skarz (Milsom 77); Agard, Smallwood, Frecklington, Pringle; Revell (Vukic 120), Thomas (Brindley 54).
Unused: Shearer (GK), Davis, O'Connor, Hitchcock.
Bookings: Cuthbert for a foul on Pringle (31); Morgan for a foul on Lisbie (34); Odubajo for excessive celebration (35); Clarke for a foul on Tavernier (64); Tavernier for dissent (78); Pringle for a foul on Batt (87); Mooney for a foul on Tavernier (93).
Rotherham United: Agard - scored; Frecklington - saved; Pringle - scored; Tavernier - scored; Smallwood - scored.
Leyton Orient: James - scored; Lundstram - scored; Clarke - scored; Baudry - saved; Dagnall - saved.
Referee: Mr D Coote.