After starting poorly against a strong Ipswich side, Tony Carr's team found themselves 2-0 down at half-time after two defensive errors.
The Hammers came out for the second half in more determined mood and James Allen pulled a goal back with 20 minutes remaining, shooting home after Daryl McMahon's effort had been cleared off the line.
However, the visitors defended resolutely and held on for the win that consigned Hammers to their first defeat of the season.
Said Tony Carr afterwards: "We started badly and gave ourselves a mountain to climb by conceding two sloppy goals. The players responded well in the second half, but Ipswich are a very good side and defended well..
"It's disappointing to lose the 100% record, but the boys have now got to bounce back and show the character needed to get things going again."
Team: Sealey, Khan, Tattam, Fletcher, Ferdinand, Allen (Akinsete 85), Lumsden, McMahon, Eastwood (Pearson 55), Mehmet, Cole. Subs unused: Morris, Carrick, McClenahan.
Meanwhile, goals from San Lee and Marce Collington rounded off an impressive performance for Kevin Keen's youngsters at Bristol City.
After some impressive play in the first half, Hammers took the lead on the stroke of half-time when Korean striker Lee tapped home after a corner kick dropped to his feet just a yard out.
Midway through the second half, the lead was doubled when Collington raced down the right and cut inside before firing a low shot into the far corner of the net.
City then pushed forward in search of a comeback, but the Hammers held firm and were never in danger of surrendering their lead.
Said Kevin Keen: "We played very well and it was nice to keep a clean sheet - our first of the season.
"We didn't completely dominate the match but I never felt that we were vulnerable and it was nice to see us pick things up in the second half in search of the second killer goal.
"We are now unbeaten in three matches and the players are beginning to settle down and find their feet. Consistency is the key and that is something they are beginning to understand more and more."
Team: Reed, Wright (Henry 85), Parrington, Laws, Blewitt, Cohen, Bunce (Shaw 75), Tucker, Noble, Collington, Lee (Yao 70). Subs unused: Behcet, Stokes.