The SFA had originally approached O’Neill to become Gordon Strachan’s successor but he decided to stay as boss of Northern Ireland with McLeish happy to get another chance.
“I see it as a bit of fate,” said the former Scotland defender McLeish, 59, who had a 10-game stint in charge of the national team in 2007.
“I see that as it was meant to happen and I have to make the most of that. Michael turned it down and you think, ‘oh wait a minute, it is not over yet’.
“When Michael went in for talks you think he is going to take it because it is, after all, a fantastic job and we are a fantastic nation and Michael lives in this country.
“But he turned it down for his own reasons and that gave me a chance to get in the door.”
McLeish’s appointment is not overwhelmingly popular among Scottish football fans with some of the Tartan Army still unhappy that his first stint ended with him walking away to take over at Birmingham.
However, the former Rangers manager, who will now prepare for friendlies against Costa Rica and Hungary next month, believes he can win them over.
“Sometimes I thought would it never happen again for me, because of leaving, and the circumstances,” said McLeish. “I understand the divide of some of the supporters but I believe I am the right man to come back.
“I have to prove them wrong. That’s what I am here to do, to get them right behind me and the only way I can do that is by getting this team winning.”