ITV News Washington Correspondent Robert Moore explains why Donald Trump made the decision
The cuts will come in to force before Donald Trump leaves office on January 20, the Pentagon said.
The president's national security advisor said Mr Trump's aim is to have withdrawn all troops from the two countries by May, but once Joe Biden takes office, it is up to him whether this happens or not.
Acting defence secretary Christopher Miller said the plan is to cut the number of troops in Afghanistan from more than 4,500 to 2,500, and in Iraq from about 3,000 to 2,500 by January 15.
However, the withdrawal plan falls short of Mr Trump’s oft-repeated vow to end America’s long wars.
The new plan will accelerate troop withdrawals from Iraq and Afghanistan in Mr Trump’s final days in office, despite arguments from Republicans, US allies and senior military officials in favour of a slower, more methodical pullout.
Mr Trump has refused to concede his election loss to Joe Biden, who takes office on January 20, five days after the troop withdrawals are slated to finish.
Mr Miller said the US remains ready to respond if conditions deteriorate.
“If the forces of terror, instability, division and hate begin a deliberate campaign to disrupt our efforts, we stand ready to apply the capabilities required to thwart them,” he said in a statement to reporters in the Pentagon briefing room.
In Afghanistan, in particular, military and defence leaders have consistently said the Taliban has not yet met requirements to reduce violent attacks against Afghan government forces.
US forces have remained in Afghanistan since they invaded in October 2001.
The decision has already received a cool reception from some Republican leaders on Capitol Hill, and a blunt critique from Nato secretary general Jens Stoltenberg.
Mr Trump’s national security adviser Robert O’Brien said the president is keeping his promise to the American people to get US troops out of war zones.
“By May, it is President Trump’s hope that they will all come home safely and in their entirety,” Mr O’Brien told reporters at the White House shortly after Mr Miller made the announcement at the Pentagon.
“I want to reiterate that this policy is not new,” Mr O’Brien added.
“This has been the president’s policy since he took office.”
Four rockets later struck inside Baghdad’s heavily fortified Green Zone, Iraq’s military said, wounding at least two people and signalling an end to an informal truce announced by Iran-backed militias in October.
The rockets were fired from the al-Amin al-Thaniyah neighbourhood of the Iraqi capital, according to the military’s statement.
Two security officials said the rockets struck just 600 metres from the US Embassy and were intercepted by the C-RAM air defence system installed by the US earlier this year.
There was no immediate claim of responsibility.
Two Iraqi security forces personnel were wounded, the officials said.
Frequent attacks targeting the embassy have led Washington to threaten to close its Baghdad diplomatic mission and sparked a diplomatic crisis before the US federal election.
In mid-October, Iran-backed militia groups announced they would temporarily halt attacks targeting the American presence in Iraq, including the embassy, on the condition that US-led coalition troops withdraw from the country.