The opening goal came in the 16th minute when Fernandinho's slide-rule pass was allowed to run by Alvaro Negredo, putting the West Ham defence on their heels and giving Aguero the opportunity to ghost into the box and finish with aplomb beyond Jussi Jaaskelainen.
The Argentina international then accepted a gift-wrapped second from the home side early in the second half as he was left unmarked eight yards out to power a header in at the near post from David Silva's free-kick despite the best efforts of Jaaskelainen.
West Ham responded well and enjoyed their best period of the match, which culminated in an improvised response as Stewart Downing's header back across the box was flicked on by Ravel Morrison for Ricardo Vaz to fire an overhead kick into Joe Hart's bottom corner in the 58th minute.
But City's first away win in the Premier League this season was sealed with 10 minutes remaining as Aguero turned provider, setting up Silva with a neat back-heel to curl a powerful left-foot shot across Jaaskelainen to halt any hopes of a comeback from the home side.
Hopes were high among the home fans at kick-off. With the 3-0 win at Tottenham still fresh in their minds, rarely-heard chants of "Sam Allardyce's barmy army" rang out around Upton Park.
West Ham started with the same purpose and drive they displayed at White Hart Lane two weeks previously. Mohamed Diame picked the ball up from Razvan Rat before cutting inside and hitting a swirling shot that flew inches wide of Joe Hart's goal.
Then City started to take a grip of the game. Reid put in a crucial tackle to deny Aguero but the New Zealand defender switched off moments later and City's Argentina striker took full advantage.
Fernandinho played a long ball along the floor from the halfway line towards Negredo. Winston Reid and James Tomkins expected the Spaniard to collect the ball, but he sold them a dummy, leaving the ball completely. Aguero was in behind the two defenders and he slotted the ball calmly past Jaaskelainen.
Aguero could have made it 2-0 two minutes later, but he volleyed straight at the West Ham goalkeeper while free inside the box.
City were playing some delightful football. Silva was given too much time on the ball and he kept looking to unlock the home defence with a series of superb incisive passes.
Aguero was looking unstoppable. The striker slalomed his way through the West Ham back line and drew another save from Jaaskelainen.
Silva then entered the book with a dangerous late tackle on Rat and Michael Oliver also cautioned Kevin Nolan.
West Ham were barely creating anything going forward. Vaz Te headed weakly into Hart's arms just before half-time. City flew up the other end and would have doubled their lead had Jaaskelainen not pulled off a save to deny Yaya Toure.
What Allardyce said to his team at half-time had little effect as the Hammers fell 2-0 down after another piece of shambolic defending.
This time Vaz Te was the offender. The Portuguese player gave Aguero two yards of free space in the box and the striker capitalised by nodding Silva's cross past Jaaskelainen.
But West Ham responded and Rat's cross made its way to the back post where Downing headed back and Morrison flicked on before Vaz Te, with his back to goal, acrobatically beat Hart from eight yards.
The goal lifted the home side, but City went back on the attack with Negredo, who struck the bar on a breakneck counter.
West Ham were vulnerable as they pushed for an equaliser and City capitalised.
With 10 minutes left, the visitors went on a lightning counter-attack. Toure played in Aguero, who back-heeled to Silva and he curled the ball home after giving Reid the slip.