Chris Maguire struck twice in three minutes on what could prove to be his final appearance for the Dons.
A left-foot volley from Riordan, who is out of contract this summer and tipped to leave, found the top corner after 21 minutes to put Hibs in front, but Josh Magennis headed in an equaliser after 48 minutes.
And Maguire, who is yet to decide on the offer of an extension to stay at Pittodrie, netted after 75 and 77 minutes as the Dons secured just their second win in 12 games to climb above Hibs and finish the Clydesdale Bank Premier League season in ninth place.
Riordan returned to the starting line-up for a match in which Hibs said farewell to former player and manager Eddie Turnbull, who was also boss at Aberdeen and died last month aged 88.
While another out-of-contract player – Maguire – may have been the main reason for Scotland boss Craig Levein’s attendance, Riordan was the difference in the first half.
Hibs could have taken a third-minute lead, but Dons goalkeeper Jamie Langfield saved when Liam Miller was played through one-on-one by Akpo Sodje.
The visitors had numerous set-pieces, but the closest they came was when Joe Shaughnessy forced Mark Brown to save at his near post.
Riordan had an effort ruled out for offside before Brown saved Maguire’s swerving effort from 20 yards.
Hibs went close when Ricardo Vaz Te hit the foot of the upright with a right-foot shot from 20 yards before the hosts took the lead after 21 minutes.
David Wotherspoon could not control in the D and the ball looped over to Riordan, who curled a left-foot shot into the top corner.
It was Riordan’s 11th goal of the season and his 104th in two spells with Hibs.
Sodje fired narrowly over from 25 yards and Richie Towell then shot straight at Langfield from long range before Riordan was in the thick of the action again.
After a one-two with Miller, Riordan went down in the area claiming a trip by Nikola Vujadinovic, but the forward’s appeals were waved away by referee Willie Collum.
Aberdeen equalised little more than two minutes after the restart when Maguire’s corner to the near post found Magennis, who rose unmarked to head in.
Two minutes later Hibs had a chance to go in front once more when first Sodje sliced a shot and then Towell got in a tangle and appeared to kick the ball against his own arm while trying to tuck it in.
Another Maguire corner troubled Hibs soon after and Brown saved Vujadinovic’s free header before the on-loan Udinese defender scrambled a Riordan effort off the line soon after.
Riordan had a further opportunity when latching onto Sodje’s header, but could only fire into the side-netting.
Despite the pressure, Hibs found themselves behind after 75 minutes as Smith’s shot bobbled free in the area and Maguire swept in.
Little more than a minute later Maguire struck a stunning second, his wicked shot from the edge of the area going in off the post.
Langfield saved a Wotherspoon header from Riordan’s cross as Hibs tried to pull a goal back before Maguire had a long-range shot saved by Brown.
Wotherspoon hit the bar with an effort from 20 yards at the other end before Riordan was replaced in the 89th minute and Hibs’ season ended with one win in 10 games and in 10th place in the SPL table.