Akpo Sodje put Hibs in front after 23 minutes with his fourth goal in four games and Ricardo Vaz Te struck the post in the second half.
Substitute Liam Craig headed in Danny Grainger’s 74th-minute corner as a Saints player found the net in the Scottish Premier League for the first time since February 1 before Moon prodded in a 92nd-minute winner.
It was Saints’ first win in almost three months, since the 2-0 defeat of Hamilton in which Stevie May struck twice, and ended a run of more than 11 games and 18 hours without an SPL goal.
The win gives the Perth side hope of equalling their eighth-placed finish of last term.
Prior to Saturday’s match, St Johnstone’s most recent SPL goal came in the March 5 1-1 draw with Hibs, but that was a Richie Towell own goal.
Hibs, too, have been poor of late and lost to bottom club Hamilton before drawing with 11th-placed St Mirren last week.
Hibs captain Paul Hanlon was shifted from his usual central position to left-back in a reshuffle showing four changes, with Jakub Divis making his debut in goal.
None of the 10 players Hibs boss Colin Calderwood yesterday announced were surplus to requirements were included in the matchday squad, with the futures of top-scorer Derek Riordan and Liam Miller, both out of contract at the end of the season and named on the bench today, remaining uncertain.
The visitors started the better and Divis held Peter MacDonald’s weak header from Chris Millar’s cross after four minutes.
Vaz Te then cut in from the right and saw a left-foot effort palmed over by Peter Enckelman, who was beaten moments later.
Hanlon played the ball through for Sodje to loft it over the advancing goalkeeper and continue his hot streak in front of goal.
The ball ran away from Vaz Te as he went on a mazy run into the visitors’ penalty area and Francis Dickoh headed a Callum Booth free-kick over as Hibs threatened again.
Martin Scott and Towell each shot wide either side of a Murray Davidson effort off target.
Hibs almost claimed a second after Dickoh found Scott down the right.
The midfielder played the ball inside for Vaz Te, whose right-foot effort beat Enckelman but came back off the upright and he could not control the rebound.
Saints replaced Danny Invincibile with Liam Craig and Davidson with Graham Gartland, while Hibs brought on David Wotherspoon for Sodje, with Vaz Te moving up front.
A long-range Victor Palsson effort failed to trouble Enckelman before Saints equalised after 74 minutes.
Grainger’s inswinging corner was met by Craig, who headed in unmarked to become the first Saints player to score in the SPL for almost three months.
Danny Galbraith returned from an ankle problem as he replaced Scott but Hibs struggled to get behind the visitors’ defence.
Andy Jackson headed a Chris Millar cross back into the six-yard box, but MacDonald could not get the vital touch and Hibs scrambled the ball clear.
It was a warning of what was to come as in the second minute of stoppage time Jackson’s cross came off the crossbar, Craig headed it down and Moon prodded in beyond Divis.