They have also re-signed veteran full-back Peter Petersen but confirmed that the much-reported deal for Cuthbert Malajila to move to Mamelodi Sundowns was completed in midweek and that assistant coach Ronnie Kanalelo has left.
Maritzburg were among the first sides back from holiday last week and within days had concluded a deal with Middendorp that keeps him at the club for two more years.
"Ernst is a hugely experienced coach and we have been extremely happy with his philosophy, his attitude and his commitment to the long-term development of this football club," said chairman Farook Kadodia.
"I am delighted that we have agreed terms and now look on to building on the foundation that has been laid last season and continue to improve as a team."
This week, Cloete was signed up after spending last season on loan from Orlando Pirates, with whom his contract had expired.
The 30-year-old, who has a single Bafana cap, will begin his 11th season in the Premier Soccer League having played previously at Santos, Free State Stars and Pirates.
"There was never any doubt that I would be coming back," said Cloete.
"Playing the top teams in the league last season and winning, shows we have got nothing to fear this season from any side," he told the club's website.
Petersen stays on for a sixth season at Maritzburg, having previously played at Hellenic and Moroka Swallows. Now 32, he twice played for Bafana and also at under-23 and under-20 level.
Malajila's impending move was announced last month but the deal has only now been completed.
Kanalelo has left to take up a post as assistant coach of Namibia's national team.
Yesterday, the former Mamelodi Sundowns goalkeeper tweeted: "To Maritzburg, thanks a million, it was really a tough decision to make but I'm very grateful for the opportunity the club gave me."
Earlier this month, Maritzburg extended the contracts of Ryan de Jongh, Thabang Matuka and the tough-tackling Michael Morton.