Badstuber, plagued throughout his career by serious injuries, had joined Schalke in January to get match practice.
The 28-year-old, who joined Bayern 15 years ago, is likely to continue his career abroad as a free agent, Bayern said.
"It was clear from the start that Holger Badstuber, after his loan spell at Schalke, would seek a new experience most likely abroad," Bayern CEO Karl-Heinz Rummenigge said in a statement, adding his contract ran out next month.
Badstuber, who has earned 31 caps for Germany since 2010, suffered consecutive cruciate ligament tears in 2012 and 2013 that kept him out for long spells before several more injuries in recent seasons.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
(Reporting by Karolos Grohmann; Editing by Janet Lawrence)
