A double from the Argentine killed off the Hammers, although it was the Spaniard who shined as Manuel Pellegrini's side put its woes on the road to one side at Upton Park.
City had just one point to show from its first three road trips of the current campaign but reversed that trend with a professional performance at Upton Park that lifted the club 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 its 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 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 was unchanged following a 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 City had the lead when Fernandinho's seemingly innocuous ball split the defense 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 halftime.
The Hammers was soon made to pay. City doubled the 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 home side 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 WesT Ham off, with Aguero's backheel allowing Silva the time to curl home the third, completing a welcome win for Pellegrini.