Bayern said the 26-year-old was joining on a five-year contract but did not give the transfer fee. Kim joined Napoli last summer and anchored the defence as they won Serie A.
"It's a new beginning for me," Kim told the Bayern website. "My first goal is to play a lot of games. In addition, I want to win as many trophies as possible."
He also posted a farewell to Napoli, and departing coach Luciano Spalletti, on Instagram. "To my passionate club Napoli, Mister Spalletti, my team mates, and above all to Napoli fans, I would like to express my gratitude."
Kim has 49 international caps and played in China and then for Fenerbahce in Turkey before joining Napoli. "He impresses with his physical presence, as well as his mentality and speed," said Jan-Christian Dreesen, the Bayern CEO.