Nikki R. Haley, the American ambassador to the United Nations.Tom Brenner/The New York Times

President Trump’s ambassador to the United Nations, Nikki R. Haley, has resigned, ahead of what Mr. Trump promised on Twitter on Tuesday was a “Big announcement” with Ms. Haley at the White House.

Ms. Haley, a former governor of South Carolina, had been an early and frequent critic of Mr. Trump, so when he named her the envoy to the world body weeks after his election in November 2016, the appointment was seen as an olive branch.

The daughter of immigrants from India, Ms. Haley favored free markets and global trade and earned international attention for speaking out against the Confederate battle flag in the aftermath of the 2015 massacre at a black church in Charleston. During Mr. Trump’s presidential campaign, she sharply criticized his demeanor and warned what it might mean for American diplomacy — even suggesting that his tendency to lash out at critics could cause a world war.

As ambassador, Ms. Haley was an outspoken and often forceful envoy — someone whom foreign diplomats looked to for guidance from an administration known for haphazard and inconsistent policy positions. She was quick to voice her own opinions on the big policy issues that are high on her agenda, like Iran and North Korea. And she has cast herself as someone who can sway her mercurial boss on issues like Russia sanctions, refugee resettlement and the value of the United Nations itself.