The 21-year-old has endured a tough season so far due to numerous injury problems and has been restricted to just four Serie A appearances.
A fractured right metatarsal had kept him out of action for two months already and after the issue failed to heal properly, Milan opted to send the Italy international to have surgery.
Milan, like El Shaarawy, are having a season to forget as they sit in 13th place with only four wins from 17 Serie A matches and they look set to be without the attacker until mid-March.
The injury also puts the player's FIFA World Cup participation in jeopardy should he not return on schedule, although coach Cesare Prandelli has previously revealed physical tests in April will determine who is in contention.
He said: "The most important thing will be in April when I'll call 33-35 players in for physical tests. From that group we'll pick the final 23 for Brazil, because this World Cup is going to take up a lot of energy.
"Up until April everyone is open to be picked, including the 'old guard' like Francesco Totti, Luca Toni, Antonio Di Natale and Antonio Cassano."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.