"I informed John Bolton last night that his services are no longer needed at the White House".
Mr Bolton denied being fired and said he had resigned.
US National Security Advisor John Bolton submitted his resignation on Tuesday morning.
"I offered to resign last night and President Trump said, "Let's talk about it tomorrow", Mr Bolton tweeted".
Bolton's ouster came as a surprise to many in the White House.
Inside the administration he advocated caution on the president's whirlwind rapprochement with North Korea and against Trump's decision past year to pull USA troops out of Syria.
His dismissal comes a day after Trump announced that peace talks with the Taliban were "dead" following a vehicle bomb attack in Kabul, Afghanistan, in which 12 people, including a USA soldier, were killed.
Bolton had also served in the administration of George W. Bush as USA ambassador to the United Nations.
Bolton, according to reports, had opposed the peace agreement with the Taliban that collapsed after Trump cancelled a secret meeting at Camp David between Taliban leaders and the president of Afghanistan.
Bolton was Trump's third national security adviser, and began the job in April 2018 after the departure of Army Gen. H.R. McMaster.