James Coppinger's injury-time winner ensured Doncaster were crowned champions - just seconds after Brentford had missed a penalty.
The Bees had their chance to seal promotion after Clayton Donaldson was bundled over in the box, but on-loan Fulham striker Marcello Trotta blasted his penalty against the bar.
Billy Paynter then raced away on the break and squared for Coppinger to slide home at the far post.
Bournemouth, who were top at the start of the day, draw 0-0 at Tranmere but were promoted to the Championship as runners-up.
At the other end of the table, Scunthorpe had their relegation to the fourth tier confirmed after Colchester defeated Carlisle, rendering the Iron's 3-1 win over Swindon futile.
It was a frantic finish for Scunthorpe with all four goals scored in the last seven minutes, including two in stoppage time, but it proved not to be enough.
Swindon took the lead in the 83rd minute through James Collins but Scunthorpe levelled four minutes later through Michael Collins.
James Alabi added the home side's second from a penalty before Karl Hawley scored their third in the seventh minute of added time, but it was not enough thanks to Colchester's 2-0 win against Carlisle.
Gavin Massey and Tom Eastman were Colchester's saviours with goals in the second half as they ensured their side's League One status for next season.
In other games, Sheffield United drew 0-0 against Preston while Yeovil, who finished in the play-off places, were beaten 3-2 by Bury.
Jonson Clarke-Harris scored twice for Bury before Nick Ajose put them 3-0 up at half-time, with goals by James Hayter and Kevin Dawson not enough to finish the regular season with a win for Yeovil.
Andy Monkhouse scored twice in five minutes for already-relegated Hartlepool as they drew 2-2 against Crawley.
Jamie Proctor gave Crawley the lead in the 70th minute but Monkhouse cancelled it out five minutes later, before he edged then Pools ahead.
Proctor had the final word as he levelled just before the death, as the travelling side were denied a win before their demotion to League Two.
Crewe beat Walsall 2-0 in their final game, with goals for Luke Murphy from the penalty spot and Chuks Aneke late in the game.
Leyton Orient finished one place outside of the play-offs after a 1-1 draw against Oldham.
Jimmy Smith scored first for the O's but his 10th-minute goal was cancelled out on the stroke of half-time by Kirk Millar.
Portsmouth, meanwhile, finished their season with a 3-2 defeat by Shrewsbury.
Connor Goldson, Joe Jacobson and Akwasi Asante gave Shrewsbury a 3-0 lead before Ashley Harris and Patrick Agyemang scored for Pompey, but it was not enough to finish their disappointing campaign with a final victory.
Patrick Bamford and Ryan Lowe scored as MK Dons beat Stevenage 2-0 while Notts County played out a 2-2 draw against Coventry.
Tyrell Waite's opener for County was cancelled out by John Fleck, before the home side regained the lead through Krystian Pearce just after half-time, with Franck Moussa's 85th-minute equaliser ensuring the points were shared.