The family's lawyer had sought an injunction, challenging the suspension and allowing her to return to the Neufchatel High School, which had suspended her last month.
Family lawyer Francois-David Bernier said Quebec Superior Court Justice Bernard Godbout rejected the request Monday.
Bernier had argued an urgent need for the 15-year-old girl to return to her old school to save her school year. The school had countered with a spot in a school for students with learning difficulties.
The Capitale school board said in a statement they were very satisfied with the ruling.
"Justice Godbout emphasizes that the transfer of the student in another facility to complete the school year is in her best interest," the school board said. "The school board quickly put in place the necessary arrangements to support the student in the pursuit of their academic progress and success."
Bernier said in a phone interview late Monday that the girl and her family are disappointed, but will drop the injunction request and abide by the court ruling.
But it's not at all what she wanted, the lawyer said, and the family is keeping a close watch to ensure she doesn't drop out of school.
"They are, for sure, very disappointed," Bernier said. "We have to work to be sure she's finishing her school year."
Bernier said other legal challenges are still pending, including a lawsuit.
The incident last month sparked outrage right across the country after the girl told a local paper she felt violated by the Feb. 12 search after officials suspected her of selling drugs.
The local school board says officials followed government regulations drafted in 2010 when it conducted the search, but the family lawyer countered the school went too far.
The Quebec City school board defended itself, saying it followed guidelines: a student must be searched behind a curtain, the clothes given to a staff member to look over, and the student must never be touched or be seen naked by school officials.
The school principal in question said the girl's clothes were searched and there had been no physical contact.
They found no drugs.
Comments by former education minister Yves Bolduc in the legislature drew the ire of many when he said that a strip search is permitted under "strict" guidelines and in a "respectful" manner when student security is at issue.
But in the days that followed, Quebec Premier Philippe Couillard said there was "no question" strip searches should not be allowed in Quebec schools, except under extreme circumstances.
The Quebec government has ordered an independent investigation into the incident led by retired lawyer Fabienne Bouchard, who will make recommendations by March 27 on what to do with the strip search guidelines.
Follow @sidhartha_b on Twitter.