Seven changes were made from the FA Youth Cup Fourth Round victory over Exeter City in midweek, but it was one of the four that kept their place who would open the scoring.
Leading through Brandon Cover's 62nd-minute strike, the young Foxes looked on course for all three points at Rush Green, but were to leave empty handed following a dramatic comeback from the hosts.
Kai Corbett's goal, seven minutes from time, drew the Hammers level and less than 60 seconds later, Sonny Perkins edged them in front.
Leicester had little time to respond and fell to just their second league defeat in seven games, remaining 12th in the Premier League U18 South standings, three points behind Reading in 11th, who they meet next, at LCFC Training Ground on Saturday 3 April (12pm BST kick-off).
The details...
City: Doherty; Yfeko, Cook, Abdullah, Kutshienza (Obi 45'); Lewis (Cartwright 45'), T. Pennant, Maswanhise, Wormleighton, Cover; Russ (C).
Subs not used: Chibueze, Dawkins.
Goal: Cover 62'.