The defeat leaves Dunfermline still searching for their first home league victory of the season and six points behind Hibernian with only five games left to play - an advantage Hibs could extend on Sunday with their home encounter against Motherwell.
Gary Glen and Darren Barr scored within three minutes of each other at the start of a disastrous second half for the home side.
Hearts seemed to coasting to victory before a late Marius Zaliukas own goal ensured a nervy final 10 minutes, but the visitors held on.
Dunfermline enjoyed the better of the attacking play in the opening stages, but ultimately paid the price for failing to do enough with their possession and wilting at the pressure from Hearts.
Jim Jefferies made three changes to the Dunfermline side that lost 3-0 at Tannadice last weekend.
An ankle injury to Kevin Rutkiewicz kept the defender out of this encounter, while Martin Hardie dropped out of the 18-man squad and Joe Cardle started from the bench.
Paul Willis, David Graham and Kyle Hutton came into the starting XI and made up a trio of attacking midfielders playing off lone striker Andy Kirk.
For the visitors Andy Webster and Craig Beattie both carried minor injuries and were not risked ahead of the Scottish Cup semi-final meeting with Celtic next Sunday.
Scott Robinson came into the midfield as Darren Barr was pushed back to centre half to cover Webster's absence, while Glen replaced Beattie to partner Rudi Skacel in attack.
The hosts had the game's first meaningful opportunity but Kirk could only nod Austin McCann's left-wing cross over the bar.
Jefferies' men continued to press and Kirk was unlucky to see an ambitious effort from the corner of the penalty area swerve just past the front post.
After a poor opening 30 minutes Hearts steadied themselves and enjoyed greater possession as the half wore on.
Right on the stroke of half-time the visitors passed up the best chance from the opening 45 minutes. Austin McCann's attempt to head the ball back to Chris Smith came up short with Glen intercepting and trying to round the goalkeeper. The striker managed to knock the ball past Smith but put too much on the touch and Dunfermline were able to clear.
Hearts' first-half performance reinforced the theory they were just at East End Park to make up the numbers; the game being supposedly meaningless for Hearts with little left to fight for in the league and a cup semi-final on the horizon. The opening six minutes of the second half erased that notion.
Three minutes after the restart a Scott Robinson cross was knocked down for Skacel to unleash a first-time volley that stung the palms of Smith and went out for a corner.
From the resulting set-piece Dunfermline failed to clear and Glen was able to slide the ball into the far corner of the net from a tight angle.
Three minutes later Hearts had another. Ryan McGowan's header at the back post was cleared off the line by Alex Keddie, but when the ball was knocked back into the six yard box the defender lost the aerial battle with his counterpart Barr who headed Hearts into a two-goal advantage.
Hearts continued to knock the ball around with confidence and a slick move saw Smith have to be alert again to deny Glen netting his second of the game.
The match looked to be petering out to an inevitable conclusion until suddenly Dunfermline found themselves back in with a chance.
A cross to the back post found substitute Cardle in space. The winger fired the ball back across goal and appeared to be turned in via a deflection off Hearts captain Zaliukas.
The full time whistle appeared imminent when Dunfermline were awarded a free-kick right on the edge of the penalty area, but Joe Cardle could only lift his effort over the crossbar.