Justices said in Wednesday's opinion that Judge G. Todd Baugh of Billings eroded confidence in the court system with his actions in the case of convicted rapist and former teacher Stacey Dean Rambold.
Baugh was ordered to appear before the court July 1 for a public censure.
The defendant, Rambold, was a 47-year-old business teacher at Billings Senior High School at the time of the 2007 rape. The victim, one of his students, killed herself while Rambold was awaiting trial.
The judge said the teenager was "probably as much in control of the situation as the defendant" and sent Rambold to prison for just 30 days last year after he pleaded guilty to sexual intercourse without consent.
The sentence drew widespread condemnation. Prosecutors appealed, and the Supreme Court in April ordered a new sentencing in the case by a different judge.
The decision means Rambold must serve a minimum of two years in prison under state sentencing laws, Yellowstone County Attorney Scott Twito said.
Baugh plans to retire when his term expires in December.