Serie A: Inter 0 Torino 1
The centre-back pounced from close range in the 94th minute on Maxi Lopez's flick-on to head the visitors to a second successive top-flight away victory - the first time they have achieved the feat since April 1995.
Lukas Podolski and Nemanja Vidic were the only players to threaten either goal in the first half, the former bring a good save out of Daniele Padelli.
Torino offered more in the final third after the break and brought the first save out of Samir Handanovic after 72 minutes, Cristian Molinaro having his side's first shot on target.
Inter wasted late chances courtesy of Mauro Icardi and Rodrigo Palacio, which they were left to rue as Moretti nodded home in stoppage time.
The win lifts Torino to within a point of Inter, who saw their hopes of a top-four finish dented.
Inter coach Roberto Mancini recalled Joel Obi for his sixth start of the season in place of Hugo Campagnaro at full-back, while Mateo Kovacic returned as part of an attacking trio in support of Icardi.
The visitors made two changes from their victory over Cesena, but were unable to build any momentum as Inter dominated proceedings.
Inter may have been dictating the play, but their final ball lacked quality and chances were at a premium, with only Podolski and Vidic posing any sort of threat to Padelli.
Palacio created the game's opening chance after 13 minutes for Podolski, but the Germany international's low shot was parried by the Torino goalkeeper.
With the visitors restricted to rare counter attacks, Inter continued to look more threatening and Vidic should have done better with a looping header from a left-wing corner.
Inter were forced into a change before the break as Marco Andreolli suffered a hamstring injury and they were lucky not to suffer further misery when
Torino's best opening arrived, Josef Martinez inexplicably leaving a Marco Benassi cross from the right when unmarked in the penalty area.
Little changed after the break as both sides wasted promising opportunities, Martinez particularly guilty of directing a free header wide from a corner.
The introduction of Xherdan Shaqiri and Maxi Lopez early in the second half gave the two teams increased attacking impetus, and it was again Torino who looked more likely, only for Alexander Farnerud to blaze over.
Handanovic was finally called into action with 18 minutes remaining, the Slovenia international getting down well to hold Molinaro's speculative effort.
Icardi wasted the chance to become Inter's hero in the final 15 minutes as he missed Palacio's low cross and Torino eventually cleared to safety.
It was the visitors who finally broke the deadlock when Moretti netted at the death.
Lopez's front-post flick found the 33-year-old unmarked six yards from goal and he made no mistake, much to the frustration of the home fans.