Ms Haley, who is an outspoken supporter of the president in the diplomatic community, and a frequent critic of the UN's stance towards Israel, first discussed her resignation with the president last week.
She will be leaving the administration by the end of 2018, according to Mr Trump, who made the announcement with the ambassador in the Oval Office.
Mr Trump said she is a "very special" person "who gets it," adding that she told him six months ago that she might want to take some time off to spend with her family. Mr Trump said that together they "solved a lot of problems" at the UN.
"She's done a fantastic job," the president said, adding the pair will be "in constant touch". Mr Trump was a frequent critic of the UN, calling it a "good time club" but today he noted Ms Haley made the ambassadorship "a more glamorous position, she's made it a more important position".
"She got to know the players," Mr Trump noted. "They really like her...and they respect her," he said about China, India, and Russia among others.
Ms Haley said "it has been an honour...to serve the country I love so much. Look at what has happened with foreign policy in the last two years. Now, the US is respected"
"They may not like it, but they respect it," she said about controversial US policies on issues like the Iran nuclear deal, recognising Jerusalem as the capital of Israel, and leaving the Paris Agreement on climate change.
"The US is strong again...it should make all Americans very proud," she said.
Ms Haley said she "can't promise" what she will be doing in 2020 but it will not be running for president. There were rumours she would run for office at that point.
"I can tell you, I'll be campaigning" for Mr Trump she said. She did not elaborate on the timing of her departure, however.
It appeared Ms Haley was considering life outside of public service after she resigns.
"It was a blessing to go into the UN every day with body armour to defend" the US, she noted on her two years leading the US mission at the world body.
Mr Trump also noted Ms Haley will "hopefully" return to work for the Trump administration, "maybe in a different capacity," he added.
Ms Haley praised the president’s daughter and son-in-law Ivanka Trump and Jared Kushner, noting they “do a lot of things behind the scenes that I wish more people knew about.”
Mr Kushner in particular has been appointed as the lead on negotiations between Israel and Palestinian officials.
“I can’t say enough good things about Jared and Ivanka. Jared is such a hidden genius that no one understands,” Ms Haley said.
There is also a controversy pending over Ms Haley's use of private jets with taxpayer money, but it is unclear if that is the reason for her resignation.
Richard Gowan, senior fellow at the UN University, told The Independent Ms Haley is, by and large, considered a "pretty effective diplomat in New York".
He credited her with being "pragmatic and collegial with other representatives of big powers, and had a good working relationship with Secretary-General Antonio Guterres."
Ms Haley was the first female governor from South Carolina and one of two Indian-Americans elevated to the position of US Ambassador.
Mr Trump relied on Ms Haley in many ways within the diplomatic community, particularly to solidify the US-Israel relationship.
She led the charge to withdraw the US from the Human Rights Council, a 47-member body in Geneva which Ms Haley said had a "chronic anti-Israel bias".
In the wake of the 20 June withdrawal, Ms Haley said the body was “an organisation that is not worthy of its name".
“Look at the council membership, and you see an appalling disrespect for the most basic rights,” Ms Haley said.
Ms Haley also accused the council of maintaining a “disproportionate focus and unending hostility towards Israel" that shows it is "motivated by political bias, not by human rights".
Ms Haley often criticised the UN in public, but Mr Gowan said her fellow diplomats knew she was doing it for "domestic political rhetoric" rather any particular animus towards diplomacy in general.
She also was a tough critic of Russia, often hitting out at them over various issues like chemical weapons strikes in Syria and their role in the 4 March nerve agent attack on a former Russian spy in Salisbury, UK.
She accused Moscow of "cheating" and helping North Korea evade UN sanctions on fuel, textiles, and food items.
Ms Haley also accused Moscow of not only looking the other way while its citizens and companies engage in activities banned by sanctions but also of trying to cover up sanctions violations "whether they're committed by Russia or citizens of other states”.
She claimed a report authored by an independent party, detailing sanctions violations, had been “tainted” by Russia and the US has stopped publication of it.
Ms Haley was one of Mr Trump's first ambassadorial appointments in November 2016, even before he was officially sworn in.
The 46-year-old mother of two did not indicate what she will do at the end of her time in government.
As for the UN, Mr Gowan said "there will be a lot of nervousness" come towards the end of the year as diplomats worry if Mr Trump will appoint a "hardline unilateralist to replace [Ms] Haley, creating new ruptures with the United Nations."
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies