The 28-year-old will miss the Bundesliga champions' matches against RB Leipzig and Freiburg, the last two games of the season.
Bayern released a statement on their official website saying: "The 28-year-old broke his left collarbone on Sunday while hiking in the mountains while at home in Spain."
After the incident, Martinez returned to Munich and underwent surgery on Tuesday.
So much for walking it off.
- Video: Alan Pardew rocks up at Espanyol to attend training session
- Non-League sides unsure who is getting promoted even after season ends
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.