Substitute Djiby Fall scored with the final move of the match to dump Fulham out of the Europa League.
Martin Jol's side knew victory would guarantee second spot in Group K.
Clint Dempsey's strike and Swiss teenager Kerim Frei's first senior goal set Fulham on the way.
But, with Wisla Krakow beating Twente 2-1, Hans Henrik Andreasen pulled one back with a free kick after the hour and Fall scored in the third minute of stoppage time to knock Fulham out.
Andreasen's effort had looked as if it would merely make it an unnecessarily awkward second half for the hosts, with Danish side Odense - who were already knocked out - playing with purpose but creating very little.
But deep into added time, they produced a sweeping move that ended with Espen Ruud whipping in a cross from the right for Fall to head in.
For the 2010 finalists, it was a bitter end to a campaign that started 14 matches ago at the end of June, and encouraging performances by youngster Frei, Czech midfielder Marcel Gecov and defender Matthew Briggs will be of little consolation for Jol.
Although Odense made a decent start at Craven Cottage, it was not long before the hosts were picking them apart at will.
Their former Everton goalkeeper Stefan Wessels palmed away a stinging drive from Chris Baird before Frei shot wide after neat work from Bobby Zamora.
The visitors were stretched even further when Brede Hangeland met Frei's corner with a firm header that beat Wessels, only for Bashkim Kadrii to clear off the line.
Following a Tore Reginiussen error, Demspey broke through and took the ball around Wessels before his prodded effort was hacked away by Ruud.
But after 26 minutes, they finally made the breakthrough when Frei burst into space down the left and crossed for the recalled Bobby Zamora, who laid it off for Dempsey to thump a low drive into the corner.
Just over four minutes later, the lead was doubled when Moussa Dembele cut in from the right and picked out Frei's clever run before the Swiss midfielder steered a shot past Wessels.
And by the time debutant goalkeeper Neil Etheridge, 21, who , collected Peter Utaka's corner with authority in his first real challenge towards the end of the opening period, the hosts already looked to be comfortably into the knock-out phase.
Etheridge pulled off another decent save when he got a strong hand to Ruud's drive before but Odense had barely threatened before they halved the deficit.
After one of his team-mates moved the ball, to leave Fulham's wall out of position, Andreasen drove a free-kick into the bottom corner.
With Fulham beginning to show signs of anxiety, the visitors went close to an equaliser after fine work from Rasmus Falk down the right.
Damien Duff's corner gave Aaron Hughes the chance to put the contest beyond doubt but the former Northern Ireland captain headed over from close range.
And Fulham paid the penalty when Ruud found space down the right and swung over a cross for Fall to head in from close range.