Zaheer bowled just 13.3 overs in the first Test at Lord's last month before sustaining the injury.
"Got the surgery done on ankle on Monday," Zaheer wrote on his Twitter page.
In his latest tweet, he wrote, "Recovering well getting used to walking on crutches."
Zaheer was touted to play a big role in India's [ Images ] fortunes in the ongoing four-match Test series against England [ Images ] but left the field on the first day of the Test series after bowling 13.3 overs and taking two wickets.
R P Singh was called up in his place.
India, who were ranked No 1 at the start of the series, have conceded an unassailable 0-3 lead to England.