It said mobile phones had no place in the courtroom, and banned judges from using them while hearing a case.
At the time, the judge was presiding over the trial of two men on stabbing charges at a court in Frankfurt.
Lawyers for the accused lodged a motion of bias against the defence after the judge was seen using a mobile phone.
Germany's Federal Court of Justice (BGH) threw out the convictions after the judge - who has not been identified - was found to have checked the phone several times during 10 minutes of witness testimony.
The judge also texted a babysitter twice when the hearing ran over longer than expected.
BGH judge Thomas Fischer said mobile phones "do not belong in the courtroom - that goes for onlookers, lawyers and of course also for judges".
He stressed that judges must be focused on the case at all times.
Germany's highest civil court has ordered two retrials after a judge was discovered arranging childcare via text message during court hearings.