The 44-year-old succeeds Steve Evans who moved to League One side Peterborough United on Tuesday and joins a club just three points and two positions ahead of his former team.
The Stags are currently fifth in the Football League’s bottom tier, just two points off the automatic promotion places with 12 games of the season remaining, while Swindon sit back in seventh.
“I wouldn't be sat here if I couldn't get this club into League One,” Flitcroft said. “I had a fantastic group of players at Swindon and I worked for a fantastic chairman. I must thank Lee Power, but I couldn't turn this opportunity down.”
Flitcroft already has a League Two promotion to his name when he took Bury up in 2015 and he bring his assistant Ben Futcher to Field Mill with him, leaving Matty Taylor to take over at Swindon on a temporary basis.