The Hibs strikers both slotted home from inside the box as the visitors moved into eighth place in the table, ahead of Aberdeen and St Johnstone and 16 points above their opponents.
Hamilton again struggled to find a goalscoring threat until Flavio Paixao netted deep in injury-time as they lost their game in hand on St Mirren without reducing a seven-point gap.
Hamilton defender Simon Mensing almost found some much-needed cheer when he crashed a header off the bar moments before the opener, a day after it emerged he had served a four-week ban for testing positive for a banned stimulant before proving he had ingested it unwittingly.
But Hibernian went on to banish their relegation fears after producing their best sequence of wins since 2005.
UK Anti-Doping accepted that an apparently legitimate dietary supplement Mensing was taking had been contaminated with methylhexaneamine, although a section of the visiting fans had a selection of taunting songs ready for him.
Accies lined up with an attacking formation as they searched for their first SPL win at New Douglas Park this season. Dougie Imrie was playing just ahead of a three-man midfield, with wide men Paixao and Damian Casalinuovo supporting centre-forward Mickael Antoine-Curier.
Paixao saw an ambitious long-range free-kick saved by Graham Stack as Hamilton produced an encouraging if unproductive start.
But they had an escape in the 17th minute when Hibs claimed Callum Booth had his heels clipped by Mensing after a penetrating run and one-two with Riordan. Referee George Salmond was unconvinced.
Both Francis Dickoh and Riordan both just missed the target from close range following corners before Mensing came close to silencing the Hibs fans when he crashed a header against the bar from Paixao’s corner. Accies kept the pressure on and Antoine-Curier brought down Mark Carrington’s ball into the box, but Stack blocked his volley on the turn.
Hibs took the lead in the 37th minute though when Sodje netted his second goal for the club. David Wotherspoon spotted Richie Towell’s sprint down the right channel and the on-loan Celtic full-back held off a challenge before cutting the ball back for Sodje to slot home.
Mark McLaughlin soon back-heeled the ball into the Hibs net after Stack dropped an Imrie free-kick but the Hamilton defender was ruled to have fouled the goalkeeper, who went off holding his stomach following a long spell of treatment, with Graeme Smith coming on.
Wigan midfielders James McArthur and James McCarthy and Burnley full-back Brian Easton drew the numbers for their former club’s half-time lottery, a reminder if any were needed of the rebuilding task recently faced by manager Billy Reid, who was still without injured captain Alex Neil.
Another youth-team graduate, midfielder Ali Crawford, replaced the ineffective Casalinuovo but the game was almost beyond Hamilton 20 seconds after the restart when Liam Miller found space in the box, however Tomas Cerny parried his 12-yard strike before the midfielder shot over.
Accies were soon on the front foot but Antoine-Curier could not direct Paixao’s deep cross on target from a tight angle and Imrie’s inswinging corner just flashed wide of the far post.
Hamilton’s fightback looked to have fizzled out but Smith produced a great reflex save to stop Gary McDonald’s glancing header from an Imrie corner, with home appeals that the ball had crossed the line having a whiff of desperation.
And their hopes were extinguished in the 75th minute. Imrie joined McLaughlin in closing down Sodje on the right wing, allowing Wotherspoon to run beyond and the Hibs forward hooked the ball into the path of his team-mate, who crossed low for Riordan to side-foot home first time.
Paixao volleyed into the bottom corner from 14 yards three-and-a-half minutes into injury-time following Cerny’s long free-kick but there was no time left for another attack.