Cotterill replaced Harry Redknapp after the veteran former Tottenham Hotspur and Portsmouth manager lasted just 13 games spread across two seasons.
Cotterill's successor will be the club's fifth manager in less than 18 months since Gary Rowett's controversial sacking in December 2016.
"Assistant Manager Clotet, First Team Coach Beattie and Goalkeeper Coach Flahavan have also agreed contracts until the summer of 2021".
In a statement, Birmingham said the decision had been "taken with great regret and sadness".
"However, the Board feel that a change in management at this stage is in the best interests of the Football Club".
Monk and Clotet were successful at Leeds and Birmingham's owners hope they can pick up, ironically starting against Boro on Tuesday.
Cotterill, who this week met with Hong Kong-based chairman Zhao Wenqing, admitted his frustration about the rumours after the defeat at the City Ground.
He told Leeds' official Twitter account: "Credit to Birmingham, that is the best I've seen them play for a long time, they are a very good team".
"What I've learned is you can't judge other people by your own standards".