Harlequins RL (22) 34
Tries: Sharp, Randall 3, Purdham, Rinaldi Goals Purdham 5
Catalans (8) 24
Tries: Mogg, McGuire, Pelo 2Goals: Gorrell 4
Chad Randall scored two in the first half and one in the second
Chad Randall scored three tries as Quins ended their season in style against the play-off bound French side.
Julien Rinaldi, in his last game for the club, also went over to help his side to end the season in ninth place.
Catalans took an early 8-0 lead through Adam Mogg's try and two Aaron Gorrell goals but they did not score again until Quins had 28 points on the board.
The visitors rallied with second half tries by Casey McGuire and two from Dimitri Pelo but had left it too late.
Skipper Rob Purdham was the key as Quins came back brilliantly after Catalans' bright start.
He linked up with Will Sharp on 19 minutes to send the centre on a sprint for the line from half-way.
I hear everyone dreads coming to France. I don't know why, it's a beautiful place!
Randall scored his first in the 29th minute, when he burrowed over from a metre out after good work by Danny Orr and Gareth Haggerty.
Randall added another five minutes from half-time, linking up wonderfully with Purdham to pick a hole on the Dragons right.
Purdham touched down himself just before the break and 10 minutes into the second half Rinaldi, playing his last game for Harlequins along with Henry Paul and Scott Hill, dived over for an emotional score.
But Catalans, who entertain Warrington in the play-off eliminator on Saturday, would not lie down.
McGuire slid through the defence to score and Pelo went over twice in the space of seven minutes to put his side within four points of Quins at 28-24.
However, Randall dummied the defence to go over from close range to ease Quins' nerves.
Catalans coach Mick Potter: "Confidence-wise, it's maybe given us a little bit of a knock but our preparations for the play-offs won't change too much.
"I believe in keeping good consistent routines, they're the ones that have worked for us during the year.
"It's fantastic that the game is at home. I hear in the media that everyone's dreading coming to the south of France. I don't know why, it's a beautiful place!"
Harlequins coach Brian McDermott: "Rinaldi, Paul and Hill have been fantastic players for us but it's not like we're losing a leg.
"While it's a big loss, we will come up with a similar attacking style next year. We've got people coming in like Luke Dorn, so we've just got to tweak a few things."
Quins: Sharp, Wells, Howell, Clubb, Melling, Hill, Orr, Ward, Randall, Haggerty, Temata, Purdham, Paul.
Replacements: Temata for Wells (75), McCarthy-Scarsbrook for Ward (20), McCarthy-Scarsbrook for Ward (69), Rinaldi for Randall (56), Heckenberg for Haggerty (16), Heckenberg for Haggerty (73), Mbu for Temata (57), Mbu for Paul (28), Paul for Mbu (51), Randall for Mbu (67), Ward for McCarthy-Scarsbrook (47), Haggerty for Heckenberg (53).
Catalans: Greenshields, Pelo, Wilson, Raguin, Stacul, Mogg, McGuire, Elima, Gorrell, Guisset, Mounis, Croker, Carlaw.
Replacements: Casty for Elima (27), Chan for Guisset (22), Chan for Guisset (66), Touxagas for Croker (31), Fakir for Carlaw (21), Fakir for Carlaw (66), Carlaw for Chan (48), Guisset for Casty (53), Croker for Touxagas (56), Elima for Fakir (53).
Ref: R Silverwood (Dewsbury).