Steve Morison struck two goals taking his season's tally to 22 - but it was not enough to secure automatic promotion on an afternoon of high drama in League One.
Two goals in four minutes from Jonathan Howson and Jermaine Beckford ensured the 10 men of Leeds United secured the second automatic promotion spot with a 2-1 win against Bristol Rovers at Elland Road.
It was 90 minutes of mixed emotions for Kenny Jackett's side - and the home fans - as they did all that was asked of them, but just fell short of clinching runners-up by the narrowest of margins.
However, there was enough from this performance to suggest that The Lions have re-found the zip and zest that had perhaps not been as prevalent in the past month or so, and with a two-legged Play-Off tie against Huddersfield on the horizon, it was crucial that Jackett's men finished the normal season positively.
Millwall could have gone ahead with 88 seconds on the clock when Lewis Grabban was fed by Chris Hackett, sprinted into the area and hit a cross-shot that flew tantalisingly across the face of goal inches away from the boot of Morison.
And instead of being a goal to the good, The Lions found themselves trailing just 60 seconds later.
A routine-looking free-kick from the left by Jonathan Douglas, however, was not dealt with efficiently by the home defence and Ward buried a low shot into the bottom right corner of the net.
The celebrations of Swindon's 2,200 travelling supporters were instantly drowned out by a vociferous home crowd who did their best to spark an instant response from their team.
Scott Barron's ninth-minute free-kick was headed narrowly wide by Paul Robinson before Millwall's prayers were answered when Shaun Batt was sent sprawling in the area by Douglas on 14 minutes.
Up stepped Morison and calmly despatched the resulting spot-kick into the bottom left corner.
The home side immediately pressed for a second and Darren Ward's header was tipped to safety before Liam Trotter nodded over from a Scott Barron cross.
Despite the enormity of the occasion, both teams pushed forward in an open, entertaining game and could not be faulted for effort or commitment.
However the frenetic pace of the first half looked to have taken its toll as both teams had an edginess about their play after the restart.
But as news filtered through that Bristol Rovers had taken the lead at Leeds United, the atmosphere changed - and both teams stepped up a gear.
The Den was rocking again and half-chances came and went at both ends before Morison raced up the right wing and whipped in a low cross that Gordon Greer diverted into his own net from barely two yards.
By now Leeds had equalised against Rovers but, as things stood, The Lions were in possession of second place.
That changed when 10-man Leeds went 2-1 up and suddenly the atmosphere fell flat.
Swindon should have levelled on 68 minutes but top-scorer Billy Paynter blasted over from close range.
Just two minutes later Morison picked up the ball on the right, strode forward and hit an unstoppable dipping effort that left keeper Lucas grasping at thin air.
There was still time for Charlie Austin to miss a glorious opportunity after Paynter flicked on Alan Sheehan's cross, before Paynter deflected home Sheehan's free-kick with six minutes remaining.
Hackett could have re-established Millwall's two-goal cushion, deep in injury-time but his heavy first touch from a Marc Laird pass saw the ball trickle of play with the last attack of the game.
Millwall: Forde, Smith, Barron, Abdou, Robinson, Ward, Grabban (Laird, 66mins), Trotter, Morison, Batt (Harris, 53mins), Hackett. Subs not used: Sullivan, Frampton, Obika, Alexander, Craig.
Bookings: Morison (15mins), Batt (49mins)
Scorers: Morison (14mins, pen, 72mins), Greer (62mins, og)
Swindon Town: Lucas, Sheehan, Douglas, Greer, McGovern (O'Brien, 76mins), Jean-Francois, Paynter, Darby (Amankwaah, 76mins), Ward, Ferry, Austin (Nouble, 84mins). Subs not used: Cuthbert, Easton, Timlin, Smith
Bookings: Jean-Francois (23mins), Paynter (60mins)
Scorers: Ward (3mins), Paynter (83mins)
Ref: Keith Stroud
Att: 17,083 (away 2,196)