Marcelo Gallardo is leaving River Plate after more than eight years at the Argentine club during which he won 14 titles.
Bayern said Demichelis, who had trophy-laden spell with the German giants as a player between 2003-10, would be replaced by Holger Seitz.
"Bayern and Martin Demichelis have agreed that the second-team coach will move to his former club, River Plate in Buenos Aires, at his own request, to take over as head coach," Bayern Munich said in a statement.
Demichelis began his career as a centre back with River Plate in 2001 before moving to Bayern.
"I came to Europe as a player from River to Bayern, now I'm going the other way as a coach," Demichelis said.
"What an incredible story."