WASHINGTON - For 13 months in the Oval Office, and in an unorthodox business career before that, President Donald Trump has thrived on chaos, using it as an organizing principle and even a management tool. Now the costs of that chaos are becoming starkly clear in the demoralized staff and policy disarray of a wayward White House.

The dysfunction was on vivid display Thursday in the president’s introduction of tariffs on steel and aluminum imports. The previous day, Trump’s chief economic adviser, Gary D. Cohn, warned the chief of staff, John F. Kelly, that he might resign if the president went ahead with the plan, according to people briefed on the discussion. Cohn, a former Goldman Sachs president, had lobbied fiercely against the measures.

His threat to leave came during a tumultuous week in which Trump suffered the departure of his closest aide, Hope Hicks, and the effective demotion of his senior adviser and son-in-law, Jared Kushner, who was stripped of his top-secret security clearance. Trump was forced to deny, through an aide, that he was about to fire his national security adviser, Lt. Gen. H.R. McMaster.

Kelly summed up the prevailing mood in the West Wing. “God punished me,” he joked of his move from the Department of the Homeland Security to the White House during a discussion to mark the department’s 15th anniversary.

When White House aides arrived at work Thursday, they had no clear idea of what Trump would say about trade. He had summoned steel and aluminum executives to a meeting, but when the White House said only that he would listen to their concerns, it seemed to signal that Cohn had held off the tariffs.

Yet at the end of a photo session, when a reporter asked Trump about the measures, he confirmed that the United States would announce next week that it is imposing long-term tariffs of 25 percent on steel and 10 percent on aluminum. The White House has not even completed a legal review of the measures.

Trump’s off-the-cuff opening of a trade war rattled the stock market, enraged Republicans and left Cohn’s future in doubt. Cohn, who almost left in 2017 after Trump’s response to a white nationalist march in Charlottesville, Virginia, indicated he was waiting to see whether Trump goes through with the tariffs, people familiar with his thinking said.

The chaotic rollout also reflected the departure of another White House official, Rob Porter, who as the staff secretary had a key role in keeping the paper flowing in the West Wing and who had backed Cohn in his free-trade views. Porter was forced out in February after facing accusations of spousal abuse.

It was the second day in a row that Trump blindsided Republicans and his own aides. On Wednesday, in another televised session at the White House, he embraced the stricter gun control measures backed by Democrats and urged lawmakers to revive gun-safety regulations that are opposed by the National Rifle Association and most of his party.

“I always said that it was going to take a while for Donald Trump to adjust as president,” said Christopher Ruddy, the chief executive of Newsmax Media and an old friend of the president’s. In business, he said, Trump relied on a small circle of colleagues and a management style that amounted to “trial and error — the strongest survived, the weak died.”

Ruddy insisted that Trump was finding his groove in the Oval Office. But his subordinates are faring less well. With an erratic boss and little in the way of a coherent legislative agenda, they are consumed by infighting, fears of their legal exposure and an ambient sense that the White House is spinning out of control.

Trump is isolated and angry, as well, according to other friends and aides, as he carries on a bitter feud with his attorney general and watches members of his family clash with a chief of staff he recruited to restore a semblance of order — all against the darkening shadow of an investigation of his ties to Russia.

The combined effect is taking a toll.

Trump’s instinct during these moments is to return to the populist themes that carried him to the White House, which is why his trade announcement is hardly surprising. Trump has few fixed views on any issue, but he has been consistent on his antipathy for free trade since the 1980s, when he took out newspaper ads warning about U.S. deficits with Japan — a concern that has shifted to China in recent years.

“The WTO has been a disaster for this country,” Trump said Thursday, asserting that China’s economic rise coincided with its entry into the World Trade Organization. “It has been great for China and terrible for the United States, and great for other countries.”

But a president who has long tried to impose his version of reality on the world is finding the limits of that strategy. Without Porter playing a stopgap role on trade, the debate has been marked by a lack of focus on policy and planning, according to several aides.

Morale in the West Wing has sunk to a new low, these people said. In private conversations, Trump lashes out regularly at Attorney General Jeff Sessions with a vitriol that stuns members of his staff. Some longtime advisers said that Trump regards Sessions’ decision to recuse himself from the Russia investigation as the “original sin,” which the president thinks has left him exposed.

Trump’s children, meanwhile, have grown exasperated with Kelly, seeing him as a hurdle to their father’s success and as antagonistic to their continued presence, according to several people familiar with their thinking. Anthony Scaramucci, an ally of some in the Trump family, whom Kelly fired as communications director after only 11 days, intensified his criticism of the chief of staff in a series of news interviews on Wednesday and Thursday.

Yet Trump is also frustrated with Kushner, whom he now views as a liability because of his legal entanglements, the investigations of the Kushner family’s real estate company and the publicity over having his security clearance downgraded, according to two people familiar with his views. In private conversations, the president vacillates between sounding regretful that Kushner is taking arrows and annoyed that he is another problem to deal with.

Privately, some aides have expressed frustration that Kushner and his wife, the president’s daughter Ivanka Trump, have remained at the White House, despite the president having told Kelly and other aides that he believes they should leave. Yet aides also noted that Trump has told the couple that they should keep serving in their roles, even as he has privately asked Kelly for his help in moving them out.

To some staff members, the chaos feels reminiscent of the earliest days of the Trump administration. Some argue Kelly should have carried out a larger staff shake-up when he came in. That has allowed several people to stagnate, particularly in policy roles, one adviser said.