Gohmert was elected as a state district judge for Texas's 7th Judicial District, serving Smith County (Tyler, Texas) from 1992 to 2002. He was elected to three terms. He first saw national recognition for a 1996 probation requirement where he ordered an HIV positive man, who was convicted on motor vehicle theft charges, to seek the written consent from all future sexual partners on a court provided form notifying them of his HIV status. The order angered LGBT activists and civil libertarians.