McLeish only took charge at the City Ground on 27 December following the departure of Sean O'Driscoll but reports emerged last week he was ready to walk out on the club.
The Scot was reportedly unhappy with Forest's transfer dealings ahead of the closure of the January window when they failed to bring in any new players, the deal to bring in Peterborough winger George Boyd falling through at the last minute on Thursday because of an issue with the player's eyesight.
McLeish, 54, remained in charge for Saturday's 2-1 defeat at Birmingham - his fourth loss in seven matches since being appointed - but he has now departed after just 40 days at the helm following talks with Kuwaiti chairman Fawaz Al-Hasawi.
Al-Hasawi told the club's official website: "I'm bitterly disappointed - as is Alex - that it has not worked out as we had hoped when he became our manager and I would like to put on record my thanks for his services to the club and wish him every success in the future."
McLeish said: "I am extremely saddened to be leaving after such a short period but even so it has been a privilege to be manager of such a fantastic football club and I want to thank the players, staff and fans for their support and wish Nottingham Forest the best of fortunes ahead.
"Both parties entered into the relationship in good faith, however, there was a difference in the understanding of the development strategy of the football club and it was felt by both parties that we should part company."
Former Forest manager Billy Davies has emerged as an early favourite to replace McLeish, while ex-Southampton boss Nigel Adkins is also prominent in the betting.
When the Al-Hasawis completed their takeover of the club in the summer they outlined a three-year vision to get Forest back into the Premier League.
However, after a 4-2 home win over Leeds on Boxing Day left the Reds within touching distance of the play-off places, they changed their plans to target top-flight football this season.
The surprising decision to sack O'Driscoll was made that evening with the Kuwaiti's stating their intent to appoint a manager with Premier League experience and McLeish was hired the next day.
Former Aston Villa boss McLeish's departure is the latest drama in a turbulent season at the City Ground.
Only last month the Al-Hasawi family caused outrage by sacking long-serving chief executive Mark Arthur and dismissing Reds legend Frank Clark from his ambassadorial role. Chief scout Keith Burt was also given the boot along with Arthur and Clark.
McLeish leaves Forest 11th in the Championship table and six points adrift of the play-off places ahead of Saturday's trip to Bristol City, who recently appointed O'Driscoll as manager.