The Bundesliga champions confirmed on Thursday that the defensive midfielder will be undergoing surgery on a knee injury he picked up in training.
"It's very bitter for Thiago and we're really sorry for the lad," said Bayern's chairman Karl-Heinz Rummenigge on his club's website.
"He's a young lad who's worked hard on his comeback and to be fit for the World Cup in the country where he was born, and suddenly both dreams are over.
"We'll take care of him in the coming weeks and do all we can to make sure he's fit for the start of the next season."
Thiago, who joined Bayern from Barcelona last summer, missed the start of the season due to injury and had various ailments during his first season in German football.
He had been named by Vicente Del Bosque in his 23-man squad for the World Cup, but has now been forced to withdraw.