Backed by a high-profile international campaign, he defied the bank's order, returned to Grameen's headquarters in Dhaka and lodged an appeal against the decision.
Sara Hossain, one of Yunus' lawyers, said the court's decision came as no surprise.
"The court has just upheld the illegal order of the Bangladesh bank", she said. " This is a sad day for Bangladesh."
Judge Muhammad Mamtaj Uddin Ahmed told the court that it was 'crystal clear' that the order to remove Yunus from his post as managing director was legal.
He added: "The mandatory retirement age for bank officers is 60, so he has also exceeded his retirement age long ago."
Yunus is celebrated worldwide for tackling poverty, throught his pioneering 'microfinance' cash loans to small farmers and villagers. Since its creation in 1983, the work of Grameen Bank has been copied in developing countries around the world.
Supporters say his troubles began in 2007, when he floated the idea of forming a political party which drew anger from Prime Minister Sheikh Hasina. She has accused Yunus of sucking blood from the poor and pulling a financial trick to avoid paying tax.
The removal of Yunus from the bank sparked street protests in Bangladesh and condemnation from overseas.
It has not yet been decided if he will appeal the ruling to the Supreme Court.