The £28million summer addition from Rennes suffered the blow in the pre-season friendly against Rangers and is now expected to miss the first few weeks of the season, at least.
David Moyes confirmed after the game that Aguerd, 26, had not suffered a broken ankle before West Ham announced the centre-back’s surgery on Monday evening.
It read: “West Ham United can confirm that Nayef Aguerd has had successful surgery on the ankle injury he sustained in our pre-season friendly against Glasgow Rangers last week.
“The Moroccan defender will now continue his rehabilitation at Rush Green with the Club’s medical team.
“Everyone at West Ham United would like to wish Nayef a speedy recovery.”
West Ham are in talks to sell fellow defender Issa Diop to Fulham in a deal that may be impacted by the length of Aguerd’s absence.