Sitting beside Trump in the Oval Office, Haley said her 18-month stint at the United Nations had been "an honor of a lifetime" and said she would stay on until the end of the year.
Haley, 46, is the latest in a long line of high-profile departures from the administration, such as former Secretary of State Rex Tillerson, who was fired in March, and Steve Bannon, Trump's chief strategist, who left in August 2017.
Describing her time at the United Nations as "fantastic" and "incredible," Trump said he had accepted Haley's resignation and would name her successor within two or three weeks.
But she said on Tuesday she would not be running and would campaign for Trump. "No, I am not running for 2020." she said.
Echoing previous statements from Trump, Haley said the United States under his presidency is now respected around the world.
"Now the United States is respected. Countries may not like what we do, but they respect what we do. They know that if we say we're going to do something, we follow it through," she said.
"She has done an incredible job. She is a fantastic person, very importantly, but she also is somebody that gets it," Trump said on Tuesday. She told Trump around six months ago that she was thinking of quitting by the end this year "to take a little time off," he said.
"She's done a fantastic job and we've done a fantastic job together. We've solved a lot of problems and we're in the process of solving a lot of problems," he said.
Her UN counterparts described her as charming and yet very tough. She saw herself as a fighter.
"I don't see (my role) as pushing an 'America First' policy, I see it as defending America because every day I feel like I put body armor on. I just don't know who I'm fighting that day," Haley told Reuters earlier this year.