MacDonald, who spent 17 years at Aston Villa as a coach and had a spell in caretaker charge in the autumn of 2010, arrives with Town three points behind League One leaders Doncaster.
Chairman Jed McCrory said: "This is a hugely important appointment at a significant moment in Swindon's recent history and we are delighted to appoint a football man of Kevin's calibre as our new manager.
"This is a clear message that the new Board is determined to drive on for promotion this season and continue to try and bring success to Swindon.
"Kevin has fantastic football credentials as a double-winner with Liverpool during his playing days and he is an excellent coach. He has great connections with top players and he is a proper football man.
"We have every faith for Kevin now to lead Swindon from the front at a pivotal moment in the campaign. It is a new start for Kevin and for our new board of directors and we move forward together with every confidence."