Michael Anton, a classically trained chef who favors French cuisine, in the White House kitchen on Tuesday before the State Dinner.

WASHINGTON — In the ceaseless churn of the Trump administration, there are many ways to leave the White House. Lt. Gen. H. R. McMaster, the ousted national security adviser, exited to the applause of colleagues who lined the West Wing parking lot. Reince Priebus ducked, alone, into a car on a rain-slick tarmac after being tossed out as chief of staff.

But nobody has matched the valedictory of Michael Anton, who ended a roiling 14-month stint at the National Security Council on Tuesday by cooking dinner for the president of France.

Mr. Anton, a classically trained chef who favors French cuisine, resigned on April 8 in a phone call with President Trump, the night before General McMaster’s successor, John R. Bolton, started work.

As he packed up his office the next day, he made a special request of the current chief of staff, John F. Kelly: that he be allowed to come back for a day to work as a line cook in the White House kitchen, helping to prepare Mr. Trump’s state dinner for President Emmanuel Macron and his wife, Brigitte.

At first bewildered by the request, Mr. Kelly readily gave his blessing.

So on Tuesday morning — clad in starched chef’s whites and wielding a knife — Mr. Anton, 48, stood at a table in the middle of a compact, busy kitchen, rows of silver pots hanging behind him. He expertly sliced rows of tiny crescent-shaped puff pastries that would be used to make shrimp canapés.

Around him, the kitchen was a tarantella of activity: four cooks grilled rack of lamb, another rinsed lettuce and yet another arranged grilled vegetables on a platter. A television on the wall was tuned to CNN, with images of Mr. Trump welcoming Mr. Macron to the Oval Office — a constant reminder of the approaching dinner bell.

“I’m a rare thing in Washington conservative circles: a right-wing Francophile,” said Mr. Anton, who first served in the White House during the George W. Bush administration, when the Iraq war curdled relations with Paris. “It makes it a special honor that I didn’t merely cook at the state dinner, but of all people, I cooked for the president of France.”

“We’ve come a long way since freedom fries,” he added.

Even in a White House of motley personalities, Mr. Anton stood out. Tall and trim, with bespoke suits, suspenders and crisply folded pocket squares (he once wrote a how-to book on men’s fashion under the nom de plume Nicholas Antongiavanni), he was a dandy in a sea of ill-fitting, rumpled suits (think Stephen K. Bannon or…