A dramatic injury-time goal from Michael Harriman sent Millwall tumbling out of the Emirates FA Cup as League Two Wycombe Wanderers upset the odds to secure their place in Monday's Third Round draw.
Paul Hayes had fired Gareth Ainsworth's side into a 50th-minute lead, but that advantage lasted just eight minutes with Ben Thompson firing home his first goal for The Lions to level matters up.
However with Neil Harris' side temporarily down to 10 men as Alfie Pavey waited to come on as a sub for the injured Fred Onyedinma, Harriman took full advantage and drilled home the winner with seconds remaining to spark wild celebrations in the visiting camp.
Millwall were showing four changes from the team that started at Burton, with loanees George Saville and Shane Ferguson ineligible to play, whilst defender Mark Beevers had to sit out the tie due to a one-match ban.
In came Carlos Edwards for right-back Shaun Cummings who dropped to the bench, Byron Webster at centre-half, plus Ed Upson and Thompson in midfield.
The opening half was at times uncomfortable for The Lions who looked below par and struggled to make much headway against a vibrant, energetic Chairboys side.
Wycombe started with real intent, but it was the home side who created the first chance on goal after 17 minutes when Steve Morison squeezed over a cross from the right and Lee Gregory's flicked header was looping towards the back of the net until keeper Matt Ingram intervened, gathering the ball at the second attempt.
However it was Ainsworth's team that enjoyed greater possession and they too created an opportunity to break the deadlock a couple of minutes later. Aaron Amadi-Holloway won a touchline tussle with Sid Nelson and threaded a pass through to Hayes, who drove wide from 18 yards.
Nelson produced a fantastic block to avert the danger in the 20th minute after Matt Bloomfield charged in on goal from Hayes' flick-on.
The visitors really had the bit between their teeth and it took an excellent save by Lions keeper Jordan Archer to keep out Bloomfield's acrobatic 31st-minute, diving low to his right to claw the ball away for a corner.
Then, three minutes before half time, Harriman's ball in from the right found the unmarked Amadi-Holloway, but he poked his effort wide of the far post with the goal gaping.
After a goalless first half, and probably a word or two from manager Harris at the break, The Lions certainly livened up after the break and in the first three minutes created more opportunities on goal than the whole of the previous 45 minutes.
A neat one-two between Upson and Williams ended with the latter's shot stinging the palms of keeper Ingram, whilst O'Brien lashed the ball over from a central position as Millwall pressed for the opener.
But the wind was knocked out of their sails on 50 minutes when, following a quick counter-attack, Hayes was on hand to steer the ball home from close range giving Archer no chance.
That joy was short-lived, however, and eight minutes later Thompson celebrated his first senior goal for his boyhood club latching onto a half-clearance from Wycombe and thumping a half-volley into the bottom left corner.
That should have given Millwall the impetus to go on and win this tie, but Harris' charges just couldn't get into their attacking rhythm and Wycombe resolutely stuck to their job, frustrating the home side and giving them little time to settle on the ball.
Harriman gave an early warning of his intent, sweeping home in the 61st-minute following another incisive break from the visitors, but on this occasion the linesman's flag came to the rescue and his effort was ruled out for offside.
Thompson was close to grabbing his second after 67 minutes with a well-worked corner move after being picked out by Shaun Williams, but he hesitated slightly before taking aim and drove narrowly wide from 16 yards.
The Lions brought on Fred Onyedinma and the youngster was a whisker away from connecting with a super through ball from Gregory, but the ball was swept behind for a corner.
Onyedinma's presence certainly looked to unsettle the Wycombe defence, although unfortunately his contribution came to an abrupt halt when he sustained a back injury following an off-the-ball incident that left the youngster in need of treatment.
Although he continued to play on, Onyedinma was forced off in the 94th minute and it was during this period with The Lions down to 10 men and trying to get sub Pavey on the pitch, that Wycombe struck a last-gasp winner.
Edwards challenged for the ball on the edge of the penalty area, went down injured and as play continued, the ball broke on the left. Sam Wood and Aaron Pierre combined to set up Harriman, and the QPR loanee made no mistake from close range to shatter Millwall's FA Cup dreams and secure their place in the Third Round draw.
Millwall: Archer, Edwards, Nelson, Webster, J Martin, O'Brien (L.Martin, 84mins), Thompson, Williams, Upson (Onyedinma, 69mins (Pavey, 90+4mins), Gregory, Morison. Subs: Forde, Cummings, Abdou, Wood.
Bookings: L.Martin (88mins), Thompson (90+2mins)
Scorer: Thompson (58mins)
Wycombe Wanderers: Ingram, Jombati, Stewart, Pierre, Hayes, Bloomfield, Wood, Amadi-Holloway (Thompson, 74mins), Harriman, O'Nien, McCarthy. Subs not used: Lynch, McGinn, Sellers, Kretzschmar, Rowe, Ugwu.
Bookings: Pierre (51mins), Hayes, (65mins), Stewart (72mins), O'Nien (86mins)
Scorers: Hayes (50mins), Harrison (90+4mins)
Ref: F. Graham
Att: 3,960 (away 658)