The Argentine found the net for the 178th time in City colours, breaking Eric Brook's 78-year goal record.
It was a typically clinical finish from Aguero, who picked up a loose ball from Leroy Sane before finding the bottom corner of the hosts' net with 20 to play.
The goal handed City the lead for the second time on the night, with Pep Guardiola's men eventually going on to win 4-2 in Naples.
Maurizio Sarri's side had initially taken an early lead through Lorenzo Insigne, but goals from Nico Otamendi and John Stones saw the visitors turn the game on its head.
A Jorginho penalty restored parity after the hour, before Aguero's historic strike swung the pendulum back into City's favour.
And the scoring was complete late on when Raheem Sterling added a fourth in stoppage time.
CITY+ and Recast subscribers can relive the entire match via the video above...
CITY + AND RECAST
You can watch exclusive City content on CITY+ and Recast.
Available for just £2.99 per month across all our digit platforms, a CITY+ subscription and provides supporters with unrivalled access to new and exclusive City content.
It will allow you to watch full-match replays of all Men's and Women's matches, selected broadcasts of Women's, Elite Development Squad and Academy matches and provides access to the full catalogue of City Studios documentaries.
The official Man City Recast channel offers fans flexible, pay-per-view live fixtures and on demand viewing options including match action from across the years, legend interviews, Best of Series, Man City Esports and City Studios documentaries.