Trinity Western University had asked the Divisional Court in Ontario for a judicial review of the Law Society of Upper Canada's decision, but the court dismissed the application Thursday.
The university's covenant forbids sexual intimacy outside heterosexual marriage, which has led to similar legal battles for the university in other provinces.
The cases pit religious freedoms against same-sex equality rights, with each side saying one is discriminating against the other.
Three judges wrote that the law society's decision to deny accreditation carefully weighed the school's right to freedom of religion versus the students' rights to equal opportunity.
"We conclude that the respondent did engage in a proportionate balancing of the charter rights that were engaged by its decision and its decision cannot, therefore, be found to be unreasonable," the judges wrote.
The key component of the case involved the university's covenant that includes requiring students to abstain from gossip, obscene language, prejudice, harassment, lying, cheating, stealing, pornography, drunkenness and sexual intimacy "that violates the sacredness of marriage between a man and a woman."
The judges slammed the nature of the covenant, calling it discriminatory despite the university's statements it is an open and accepting school.
"Individuals who may not believe in marriage, or LGBTQ persons, may attend (Trinity) but they must first sign the community covenant and thus, in essence, disavow not only their beliefs but, in the case of LGBTQ individuals, their very identity," the court said.
"To assert that that result is not, at its core, discriminatory is to turn a blind eye to the true impact and effect of the community covenant."
The law society said it is pleased with the court's decision.
The university can still open a law school, but its graduates wouldn't be eligible to be called to the bar in Ontario.
Trinity Western said it will appeal the Ontario court's decision.
The decision "points a knife at the freedom of faith communities across Canada to hold and practise their beliefs," said Guy Saffold, a spokesman for Trinity Western.
In British Columbia, the B.C. Law Society voted not to recognize the university's law school graduates and the provincial government revoked its support for the proposed law school.
The school recently won a similar case in Nova Scotia, where a court stopped that province's law society from denying the university accreditation, although the decision is now being appealed.