The former Rangers boss will succeed Walter Smith who left the position, after taking over at Ibrox on 10 January.
SFA chief executive David Taylor said: “We have moved quickly to fill the vacancy caused by the unexpected departure of Walter Smith.”
McLeish has named former Motherwell and Rangers assistant Andy Watson and Roy Aitken as his assistant.
He said: “To be manager of your home nation is a very proud day indeed for Alex McLeish, my family and friends.
“I would love to have as smooth a transition as possible, and continue the good work that Walter Smith has done.
“Walter has raised hopes of the nation fantastically well and we hope to continue that trend.”
Taylor continued: “It’s a particular pleasure to announce the appointment of a former Scotland player to the position of national coach.
“Alex McLeish played 77 times for Scotland and appeared in three World Cup finals tournaments.
“He holds the highest UEFA coaching qualifications and brings to the post 12 years of managerial experience, including international competition.
“I am sure all of Scotland will get behind Alex in support of the national side as we try to build on the improved performances of recent times.”