"No, I'm not running in 2020" for president, she joked. She said she would be supporting Trump.
Haley said she and Trump together had "solved a lot of problems. They spoke in the Oval Office, shortly after word came of her plans to resign.
Trump called Haley a "very special" person, adding that she told him six months ago that she might want to take some time off.
Watch the full announcement:
It's the latest shake-up in the turbulent Trump administration just weeks before the November midterm elections. Haley's resignation was a closely guarded secret. Congressional Republicans involved in foreign policy matters and some key U.S. allies did not get advance word from Haley or the White House.
Haley, who is speculated to hold aspirations for higher office, said at the White House: "No I'm not running in 2020."
Haley, 46, was appointed to the U.N. post in November 2016 and last month coordinated Trump's second trip to the United Nations, including his first time chairing the Security Council.
A rookie to international politics, the former South Carolina governor was an unusual pick for to be U.N. envoy.
"It was a blessing to go into the U.N. every day with body armor," Haley said, saying her job was to defend America on the world stage.
At the U.N., Haley helped spearhead the Trump administration's efforts to combat what it alleged to be anti-American and anti-Israel actions by the international body.
Trump said he was considering many candidates for Haley's job and that a successor would be named in two to three weeks.
Last month Haley wrote an op-ed article in The Washington Post discussing her policy disagreements but also her pride in working for Trump. It came in response to an anonymous essay in The New York Times by a senior administration official that alleged there to be a secret "resistance" effort from the right in Trump's administration and that there were internal discussions of invoking the 25th amendment to remove him from office.
"I proudly serve in this administration, and I enthusiastically support most of its decisions and the direction it is taking the country," Haley wrote. "But I don't agree with the president on everything."
The daughter of Indian immigrants, Haley clashed with then-candidate Trump during the 2016 campaign, denouncing "the siren call of the angriest voices" who disrespected America's immigrants. Trump tweeted that "The people of South Carolina are embarrassed by Nikki Haley."
"Before she was named by Trump to her U.N. post, Haley was elected the first female governor of South Carolina. She was re-elected in 2014.
South Carolina Republican Sen. Lindsey Graham, a close Trump ally tweeted that Haley "has a very bright future and will be a key player in both the future of the Republican Party and our nation as a whole for years to come."
As governor, she developed a national reputation as a racial conciliator who led the charge to bring down the Confederate flag at the Statehouse and helped guide the state through one of its darkest moments, the massacre at a black church.
* Follow us on YouTube
* More local news
* Send us a news tip
* Download the abc7NY app for breaking news alerts