WASHINGTON — President Trump’s personal lawyer, Rudolph W. Giuliani, abruptly resigned from his law firm, which then promptly undercut his recent statements defending the president.

Mr. Giuliani had taken a leave of absence last month from the firm, Greenberg Traurig, to represent Mr. Trump. But the firm, one of the nation’s largest, said in a statement on Thursday that he no longer worked there.

Firm partners had chafed over Mr. Giuliani’s public comments about payments that another of Mr. Trump’s lawyers, Michael D. Cohen, made to secure the silence of a pornographic film actress who said she had an affair with Mr. Trump. The president has denied her allegations.

Mr. Giuliani suggested that such payments were common at his firm, even without the knowledge of the clients. “That was money that was paid by his lawyer, the way I would do, out of his law firm funds,” he said on Fox News. He added, “Michael would take care of things like this like I take care of this with my clients.”