The Egypt international had been nursing the problem since the end of last season and played through the pain barrier in both the play-offs and Africa Cup of Nations.
Though the injury was manageable, Hegazi has opted to undergo surgery after consulting with Baggies medical staff, following his return to the club earlier this week.
The 28-year-old is hopeful of a swift return but with the season opener at Nottingham Forest now less than 10 days away, his chances of playing in the early weeks look slim.
One advantage for Albion is that it may put off prospective suitors, with a number of clubs thought to have kept tabs on Hegazi during the summer.
The player posted on Twitter last night: "Yesterday I had a successful surgery to remove an ankle sprain that was postponed since the end of last season because I have been associated with matches with the club and the team.
"I will be ready for next season's competitions soon hopefully."