The England under-21 striker blasted a magnificent opener in the 24th minute to set Hammers on their way, but goals from Gary Fletcher, Kevin Nugent and Jamal Campbell-Wright denied Glenn Roeder's men a win in the testimonial match for Orient's long-serving chief scout Len Cheesewright.
Defoe partnered Fredi Kanoute up front and, despite the lengthy lay-off, the pair combined well in their 45 minutes together, while our recent signing from Manchester United - goalkeeper Raimond Van der Gouw, made a comfortable debut between the sticks.
As expected, the Hammers' England World Cup trio of Trevor Sinclair, Joe Cole and David James were left out of the action, having only returned to pre-season training a few days ago, but other than that it was a near full strength side that started against the O's.
Orient's line-up contained two West Ham connections in goalkeeper Ian Feuer and midfielder Scott Canham, who were both professionals at Upton Park without ever playing a first team match.
The experience and class of Hammers' starting line-up shone early on, and Feuer was forced to make decent saves from Christian Dailly and Ian Pearce, before Defoe struck in typical style midway through the half.
Receiving a pass on his chest with his back to goal, the youngster turned his marker superbly before firing a first time snapshot past the despairing dive of Feuer.
Laurent Courtois and Dailly again then went close, before a mix-up at a corner in the last seconds of the half allowed Fletcher to nod home an equaliser from three yards out.
Roeder changed almost the entire line-up at half-time, leaving Richard Garcia as the only starter on the field in the second period, and a more youthful and inexperienced Hammers side found it harder to contain the lively third division side.
Titi Camara went close on two occasions, while Ragnvald Soma had a stunning volley ruled out after the ball had already gone out of play, but Orient struck their winner with just four minutes left when Nugent rose unmarked to head home a deep cross.
Campbell-Wright added a third in stoppage time with a cracking effort from the edge of the penalty area that left young goalkeeper David Forde grasping at thin air.
Hammers now face another local third division side, Southend United, in their next friendly warm-up, at Roots Hall on Tuesday night (July 23). Kick-off is at 7.45pm.
West Ham: Raimond Van der Gouw (David Forde 45), Tomas Repka (Ezomo Iriekpen 45), Nigel Winterburn (Scott Minto 45), Steve Lomas (Grant McCann 45), Ian Pearce (Anton Ferdinand 45), Christian Dailly (Ragnvald Soma 45), Richard Garcia (Billy Mehmet 76), Michael Carrick (James Allen 45), Fredi Kanoute (Titi Camara 45), Jermain Defoe (Oscar Garcia 45), Laurent Courtois (Vladimir Labant 45). Subs Unused: Daryl McMahon, Freddy Eastwood, Glen Jackson.