A double from the Argentine killed off the visitors, although it was the Spaniard who shone as Manuel Pellegrini's side put their woes on the road to one side at Upton Park
City had just one point to show from their first three road trips of the current campaign but reversed that trend with a professional performance at Upton Park that lifted them to fourth in the table.
Aguero opened the scoring in the 16th minute with a cool finish and his second-half header looked to have sealed all three points for Manuel Pellegrini's side.
Ricardo Vaz Te pulled a goal back for West Ham with an outrageous bicycle kick but it was not enough as David Silva wrapped up the points for City late on.
|By Alex Young at Upton Park
"Sergio Aguero was the star of the show as Manchester City earned their first away win of the season.
The Argentine linked up with the classy pair of David Silva and Alvaro Negredo to score twice, before the former netted a late third.
Despite the scoreline, West Ham should not be disheartened. They may have been on the back foot for the majority but they were never embarrassed and coped relatively well with City's bigger stars - bar two moments of skill from the goalscorers.
It is a reality check of sorts for Sam Allardyce after a fine win over rivals Tottenham - but the efforts of Ricardo Vaz Te, Mark Noble and Ravel Morrison should be enough to keep the smile on his face this evening."
Pellegrini made five changes to his side, which included an entirely different back four - made up of Micah Richards, Javi Garcia, Matija Nastasic and Gael Clichy - while, unsurprisingly, West Ham were unchanged following their 3-0 win at Tottenham.
After a bright start, City fired a warning shot in the 15th minute when Alvaro Negredo was denied by a superb Winston Reid tackle.
And just a few moments later they had the lead when Fernandinho's seemingly innocuous ball split the defence and was coolly slotted home by Aguero. Negredo's dummy fooled West Ham's defenders and Aguero stole in, scoring with ease.
The Argentine had two more attempts in the following five minutes, only for West Ham goalkeeper Jussi Jaaskelainen to deny him on both occasions.
West Ham's best chance of the first half was disappointingly wasted, as Mark Noble's cross was mis-kicked by Vaz Te, while Yaya Toure forced Jaaskelainen into a good stop on the stroke of half-time.
And they were soon made to pay. The visitors doubled their advantage six minutes after the break as Aguero made a mockery of poor West Ham defending, the Argentina striker nodding home unmarked at the near post from Silva's corner for his first headed Premier League goal.
City's second sparked West Ham into life, though, and goalkeeper Joe Hart had to be alert to deny Mo Diame before Vaz Te gave the hosts a lifeline with a stunning bicycle kick following Ravel Morrison's lofted ball.
City's response was almost immediate as Negredo saw his shot from an acute angle hit the underside of the crossbar and bounce away to safety, while the end-to-end action continued as Diame tested Hart with a powerful effort before Aguero's curling strike was beaten away by Jaaskelainen.
The game was well balanced but, after a lull, City killed the hosts off, with Aguero's backheel allowing Silva the time to curl home the third, completing a welcome win for Pellegrini.