Four goals were scored inside 27 minutes as Ross Docherty's fifth minute opener for the visitors was quickly cancelled out by a Lewis Mayo own goal before Matthew Tod and Josh Edwards fired the Pars into a 3-1 lead.
A late second half strike from Dom Thomas put the seal on a much-needed victory for John Hughes' men that lifts them off the foot of the table, above Queen of the South, and within three points of Ayr United in eighth position.
Thistle, meanwhile, made it three defeats in a row as they missed out on the chance to move into third place having now used up their games in hand on the teams around them in the battle for a top four finish and a place in the Premiership play-offs.
Dunfermline had only won two of their previous 15 fixtures but they will now believe that they can secure their Championship status for next season in their six remaining league matches.
"It's massive, and I think we thoroughly deserved it," said Thomas, who scored one and set up two to claim the man of the match award.
"We obviously went 1-0 down, but we kept going again and we got the result we needed.
"It's six cup final for us and we want to get maximum points so for us we're only looking up the table.
"I think you see by the way we play we deserve that."
Thistle were without top scorer Brian Graham due to illness but they took the lead on five minutes when Docherty curled home from the edge of the area.
However, the lead lasted only five minutes as Jags defender Mayo looped an attempted clearance over the head of his own goalkeeper Jamie Sneddon to draw Dunfermline level.
The home side took the lead on 22 minutes when Thomas crossed for Todd to head home at the back post, and five minutes later it was 3-1 when Edwards crept forward from left-back to latch onto another Thomas delivery to fire low past Sneddon.
Ian McCall's men never looked like recovering and Thomas raced clear to thump home Dunfermline's fourth in the 82nd minute to send the home fans home happy.