The law, passed by a Republican-led legislature and signed by a Republican governor, is due to take effect on August 1. The lawsuit was filed in the US district court in Austin on Wednesday.
The law permits concealed-handgun licence holders aged 21 and older to bring handguns into classrooms and buildings throughout the University of Texas system, one of the nation’s largest, with an enrolment of more than 214,000 students.
“Compelling professors at a public university to allow, without any limitation or restriction, students to carry concealed guns in their classrooms chills their First Amendment rights to academic freedom,” the lawsuit stated.
The lawsuit filed by professors Jennifer Lynn Glass, Lisa Moore and Mia Carter names defendants including the state’s Republican attorney general, the school’s president and the university’s board of regents.
Attorney General Ken Paxton said the law is constitutionally sound and he will defend it. “This lawsuit is not only baseless, it is an insult to the millions of law-abiding gun owners in Texas and across this country,” Paxton said in a statement.
The professors argue that they discuss controversial and emotionally laden subjects such as reproductive rights, and it would be inevitable for them to alter their classroom presentations because of potential gun violence.
There has been heightened concern about gun violence on US college campuses after several mass shootings in recent years.
University President Greg Fenves in February approved plans for holders of concealed handguns to bring pistols into classrooms, saying he had been forced to do so by the new law.
University officials said they were reviewing the lawsuit and typically do not comment on pending litigation.
Texas Governor Greg Abbott has said the law could prevent mass shootings because someone with a licenced concealed weapon could confront a gunman.
The so-called campus-carry law allows private colleges to opt out, and most of the state’s best-known private universities have done so, saying the measure runs counter to protecting student safety.
Eight states allow people to carry concealed weapons on public post-secondary campuses, according to the National Conference of State Legislatures.
The Texas law takes effect on the 50th anniversary of one of the deadliest US gun incidents on a US college campus. Student Charles Whitman killed 16 people by firing from a perch atop the clock tower at the University of Texas at Austin in 1966.