A person familiar with the lawmaker’s plans said that Mr. Gowdy had turned down an offer by the Trump administration to nominate him for a judgeship on the United States Court of Appeals for the Fourth Circuit and that he planned to enter private practice in South Carolina instead.

“Whatever skills I may have are better utilized in a courtroom than in Congress, and I enjoy our justice system more than our political system,” he said in a statement. “As I look back on my career, it is the jobs that both seek and reward fairness that are most rewarding.”

Mr. Gowdy, 53, made his name on Capitol Hill as one of Congress’s most strategic and polarizing investigators. As the chairman of the House Select Committee on Benghazi, he led one of the longest and most bruisingly partisan congressional investigations in history. The committee ultimately found no new evidence of culpability or wrongdoing by Hillary Clinton in the 2012 attacks in Libya that left four Americans dead.

But the committee’s work had another lasting effect: It discovered that Mrs. Clinton had used a private email server during her time as secretary of state. The revelation would lead to an F.B.I. investigation and would dog Mrs. Clinton’s presidential campaign.

Mr. Gowdy won the chairmanship of the powerful Oversight Committee last year, after the early retirement of another rising Republican, Jason Chaffetz of Utah. He has been criticized in that role by Democrats who say he was more interested in using the committee’s powers to look backward and investigate the administration of President Barack Obama than that of Mr. Trump.