WASHINGTON — Representative Blake Farenthold, a Texas Republican who settled a lurid sexual harassment claim with his former communications director for $84,000 and faced accusations from other aides that he ran a hostile workplace, announced Thursday that he will not run for re-election, saying the allegations have become “a political distraction.”

He is the fourth lawmaker in two weeks to announce his eventual departure from Congress amid the swirl of sexual allegations and the sixth this year.

In a five-minute-long video posted on his campaign’s Facebook page, Mr. Farenthold denied the sexual harassment allegations from his former communications director, Lauren Greene. But he admitted, with unusual candor, that he had run an “unprofessional” workplace and that his own temper sometimes got out of hand, describing himself as “profoundly sorry” for his conduct.

“I’d never served in public office before. I had no idea how to run a congressional office, and as a result I allowed a workplace culture to take root in my office that was too permissive and decidedly unprofessional,” Mr. Farenthold said.