It gave them their first win at the stadium for almost 14 years but it looked unlikely at half-time when they trailed to a Barry Nicholson strike.
Hibs pushed Gary Caldwell into midfield for his ball-winning qualities and skipper Ian Murray played in the centre of the defence alongside Gary Smith.
Both sets of players took time to adjust to the new artificial surface with several mis-timed challenges in the early stages.
Darren Young had a couple of wayward efforts on goal which never threatened to trouble Simon Brown and there was not a shot on target until midway through the first half.
Hibs should have taken the lead long before then when Dean Shiels sent Stephen Glass scurrying clear but he dallied as Derek Stillie came to meet him and Aaron Labonte made a fine saving tackle.
The Hibs fans appealed for a penalty but referee Hugh Dallas was well positioned and made the correct decision.
Hibs continued to threaten and Riordan shot across the face of the goal before Garry O'Connor fired wildly over from a tight angle.
A long-range effort from Nicholson finally brought a save from a goalkeeper with Brown content to flip the ball over his crossbar and concede a corner.
Caldwell should have done better in the 27th minute when he was unguarded at a Riordan free-kick but his near-post header sailed wide.
Hibs had another chance after 31 minutes when Steven Whittaker mis-controlled a through pass from O'Connor but managed to roll the ball back for Shiels, whose half-hit shot trundled wide.
Dunfermline snatched the lead two minutes from the break when Simon Donnelly broke clear on the left after a mistake by Whittaker and laid the ball off for Nicholson to rifle a low 20-yard shot past Brown.
Hibs had the ball in the net at the start of the second half when Shiels placed the ball beyond Stillie but he was clearly in an offside position.
Riordan missed another good chance for Hibs after 57 minutes when Glass sent him clear with a long pass. The striker took it past Stillie who had raced to the edge of his area but Andy Tod managed to get back to block his netbound shot.
Andy Tod then showed his menace at the other end when he directed a header on goal which struck Whittaker.
Hibs changed things after an hour when they sent on Fletcher and Jamie McCluskey for Scott Brown and Caldwell in what amounted to a gamble by manager Tony Mowbray.
Within six minutes, Hibs were level with a superbly-worked goal. Glass threaded the ball wide to Whittaker and his inch-perfect cross was headed home at the back post by Riordan for his 19th goal of the season.
Hibs then took the lead three minutes later when Stillie spilled a David Murphy cross under pressure from O'Connor and Fletcher rolled the ball into the empty net.
Fletcher scored his second 15 minutes from time with a left-foot shot from a Murphy pass.
Riordan added a fourth nine minutes from time after Fletcher sent him clear and he slipped the ball past Stillie.