Despite impressing at times since the Chilean's arrival, City's start to the domestic season has been hampered by their inability to win on the road.
Defeats at Cardiff and Aston Villa either side of a goalless draw have frustrated the title hopefuls, who broke their duck in style in east London.
Sergio Aguero opened the scoring early in the first half, before putting the visitors further ahead six minutes after half-time.
Ricardo Vaz Te's overhead kick reduced the deficit in style, only for David Silva to strike home after collecting a superb Aguero backheel to make it 3-1.
"I am very pleased," Pellegrini said. "The most important thing today was to win the game, but I think that we continued playing the same way we were playing in the other games away.
"I was absolutely sure that if we continued playing in the same way we did against Aston Villa, we must win again.
"That is for me the most important thing today, winning the game and continuing to play the same way.
"It was very important [to get that first away win] because one point from nine is not a good average for us.
"Before we started the game, Chelsea, Arsenal and Everton had won their game, so we couldn't lose more points losing away, so these three points are very important for us."
Aguero was the standout player at Upton Park, with his movement causing the hosts problems from the outset.
"He is a top player," Pellegrini said of the man of the match. "He makes an important difference for us.
"It is also very important for the team that he didn't play the second game with Argentina (during the international break), so he was fresh. That was also very important."
While there were some nervy moments in the second half as West Ham threatened a comeback, anything but three points would have been harsh on City.
Only wayward finishing and the fine goalkeeping of Jussi Jaaskelainen kept the scoreline down, as they made light work of the six-man midfield that had seen West Ham win 3-0 at Tottenham last time out.
"We knew that West Ham would play in the way they played against Tottenham," Pellegrini said.
"They played very well in the last game, so I spoke with the players to have patience and to move the ball until we find the space.
"I think we did it very well. We scored three goals and the goalkeeper was the best player of West Ham. He had at least four or five important saves."
His West Ham counterpart Sam Allardyce cut a frustrated figure after the match, with the Hammers' improved second-half performance of little consolation.
"It was too late, though, wasn't it? That was the problem," Allardyce said, having made a delayed entrance.
"Manchester City were better than we were today.
"I have always said if you are going to get a good result then you have to play your very, very best and sometimes the opposition don't allow you to do that.
"I think that we thought we could come out of the traps and set the tempo, but what happened was that Manchester City decided they would do that because of their quality.
"When you get the front two and Yaya Toure and Silva passing the ball like they pass it, it frightened us a little it, it put us on the back foot.
"The sad thing was that even after that, we made two basic errors for their two goals rather than the quality of Aguero or Alvaro Negredo or Silva putting the ball in the back of the net with a great fluent move.
"A simple ball down the middle for the first goal and somebody not picking up the smallest Man City player up for the second goal was really disappointing for us.
"Gifting them the two goals was something that you wouldn't expect to come back from against a team of their quality.
"But we gave it a go, I was pleased with the response. At least they didn't give up, they fought to the end and when we got to 2-1 with a good goal that we scored.
"We showed a little bit more of our passing qualities, which failed us in the first half.
"The constant passing to our players, and then the opposition regaining possession was the reason why we didn't look anything like we did at Tottenham.
"Really, our only real contribution from an attacking point of view was about 20 or 25 minutes from the end after Man City were 2-0 and that was too late."