The rare switch across managerial jobs between neighboring clubs enraged Birmingham, which demanded compensation to cover the final two years of McLeish's contract. It has also angered many Villa fans, who dislike McLeish because of his connection to their main rival.
But Villa's American owner Randy Lerner pressed ahead with appointing the 52-year-old Scot as his third manager in less than a year.
"I am honored to have this opportunity to manage a club with such a fantastic history as Aston Villa's," McLeish said. "I know that some of our fans have voiced concerns and I can understand why.
"It will be up to me to convince you that I am the right man to drive the club forward and I intend to give absolutely everything to prove that I can be a success at the club." McLeish, whose contract details have not been announced, is replacing Gerard Houllier, who left Villa last week because of heart problems after just nine months in charge.
"Unquestionably, Alex meets the criteria we set out at the beginning of our search which was based on proven Premier League experience, leadership, a hardworking ethic and, most importantly, a shared vision for Aston Villa," chief executive Paul Faulkner said.
"Alex's vast experience and proven abilities demonstrate clearly that he is a strong leader and an ambitious man."
McLeish began his managerial career with Motherwell and Hibernian before winning two Scottish Premier League titles with Rangers and then taking over the Scottish national side.
McLeish took charge of Birmingham in November 2007.
Although the club was relegated from the Premier League last month for the second time in his reign, the team qualified for the Europa League in February by winning the League Cup, ending its 48-year title drought.