A purple patch by Dundee midway through the first half in which they scored three goals in four minutes saw them finish the season in style.
And joint caretaker boss Bobby Mann said: "It was one of our best shows of the season. It was just a pity we left it so late."
It brought to an end a run of 11 games without a win for Dundee.
Queens were making it a gala event to celebrate retaining their first division status, but found from the start that it turned a little sour with Dundee's performance.
Dundee deservedly broke the deadlock after 25 minutes when a defensive clearance was swept into the middle by Colin Marshall and Steven Craig popped up to head home.
A minute later Paul Dixon cracked home a shot from 25 yards and four minutes later it was 3-0 for Dundee as Steven Craig latched on to a through ball and evaded a tackle before putting it beyond the advancing keeper.
Queen's manager Ian McCall brought on three substitutes after the break in a bid to stop the rot and it paid off within five minutes as Paul Burns was on the spot to net after Tommy English had rattled the crossbar.
Then Queens were unlucky when a net-bound shot from Derek Lyle was blocked in front of goal.
Manager McCall said: "It was disappointing to finish on a losing note after going undefeated at home since November."