WASHINGTON — The parents of Matthew Shepard, the gay college student whose murder led to the passage of a groundbreaking federal law that expanded the definition of violent federal hate crimes, harshly criticized the Trump administration’s record on civil rights in a letter read aloud in their absence during a Justice Department ceremony on Wednesday.

Judy and Dennis Shepard, whose son was beaten to death in 1998 in Laramie, Wyo., had been invited to speak at a Justice Department ceremony to mark the 10th anniversary of the law named for him and for James Byrd Jr., a black man who was dragged to his death behind a pickup truck earlier that year in Texas.

Instead, the Shepards, who said they were unable to attend the ceremony because of travel issues, singled out Attorney General William P. Barr for what they see as the Trump administration’s failure to protect the rights of transgender people. They alluded to cases recently argued before the Supreme Court about gay and transgender people who were fired from their jobs — the Trump administration filed briefs supporting the employers in both cases.

“We find it interesting and hypocritical that he would invite us to this event commemorating a hate crime law named after our son and Mr. Byrd, while, at the same time, asking the Supreme Court to allow the legalized firing of transgender employees,” the Shepards said of Mr. Barr in their letter, which was read aloud by Cynthia M. Deitle, the programs and operations director of the Matthew Shepard Foundation. Mr. Barr did not attend the event.