"We will begin our quarantine and recovery process immediately. We will get through this TOGETHER!" the president said in a late night tweet.
Trump's positive report came just hours after his senior aide Hope Hicks was tested COVID-19 positive.
Hicks is the closest aid of the president to have tested positive with coronavirus. She had travelled with the president on Air Force One early this week.
Trump, in an interview to Fox News, on Thursday night said he and the first lady spent a lot of time with her.
The US president largely avoids wearing masks and has criticized others who do so, even as public health professionals say mask-wearing is key to helping to prevent the virus from spreading.
Trump's positive test just came after he claimed on Thursday night that the end of the pandemic was in sight, capping a months-long underplaying of the seriousness of the virus.
He has come under sharp criticism for his response to the coronavirus pandemic that has killed more than 200,000 people in the United States alone.
In his first presidential debate with Joseph Biden that unraveled into an ugly melee Tuesday, Trump voiced impatience with a range of public-health restrictions, reiterating his demands that the country return to normal, and called on Democratic governors to "open these states up” quickly.
But even on a matter as grave as the pandemic, Trump indulged freely in personal mockery.
When Biden called him "totally irresponsible” for holding mass rallies without health protections in place, Trump responded by mocking Biden’s more constrained events, suggesting the former vice president would hold large events, too, "if you could get the crowds.”
But the extraordinary setback for Trump has immediate political consequences just 32 days before election day. Biden is well ahead in the polls and is making criticism of the Republican's handling of the coronavirus pandemic a key plank in his campaign.
Early Friday the White House canceled his planned campaign rally in the crucial swing state of Florida later in the day, AFP reported.
"It also looked certain that Trump would have to cancel a trip scheduled for this weekend in Wisconsin, another battleground. He had also been expected to travel frequently next week, including longer distances to western states."
Trump's official physician, Sean Conley, said in a statement that the president and his wife "are both well at this time and they plan to remain home at the White House during their convalescence."
"I expect the president to continue carrying out his duties without disruption while recovering," Conley said.
Putin wishes speedy recovery
Russian President Vladimir Putin wished Trump a speedy recovery in a telegram on Friday.
"I am convinced that your vitality, good spirits and optimism will help you cope with this dangerous virus," the Kremlin quoted Putin as saying in the message.
Putin's spokesman Dmitry Peskov had earlier wished Trump "a speedy and easy recovery" on behalf of the Kremlin.
Peskov said Putin was considering whether to be vaccinated against the coronavirus, after Russia announced in August that it had developed a vaccine named "Sputnik V" after the historic Soviet-era satellite. "When he does it, we will announce it," Peskov said.
Tedros Adhanom Ghebreyesus, the head of the World Health Organization, also wished the couple "a full and speedy recovery".
Trump is pulling the United States out of the UN health agency, which he accuses of botching its response to the pandemic and being "a puppet of China".
Throughout the pandemic, Tedros has consistently hit out at divisions in the international community, warning of the consequences of a lack of solidarity.