On Thursday night the president predicted that the end of the pandemic was in sight.
Shortly thereafter, news broke that Hope Hicks, a top adviser and trusted aide, had tested positive for the virus.
Hicks traveled with the president on Air Force One on Tuesday and Wednesday.
The development alters the presidential race dramatically.
The White House issued a new schedule for Trump's activities on Friday that did not include his planned trip to Florida.
Biden is scheduled to campaign in Michigan on Friday. Both states are swing states that could decide the US election.
Trump, who has been criticized for questioning the efficacy of wearing a face covering, produced a mask from his pocket in the first presidential debate on Tuesday and said, "I wear masks when needed. When needed, I wear masks."
He then ridiculed Biden for wearing them regularly: "I don't wear masks like him. Every time you see him, he's got a mask. He could be speaking 200 feet away from them and he shows up with the biggest mask I've ever seen."
Trump has held regular rallies around the country to drum up enthusiasm for his candidacy against the former vice president, who has eschewed campaign events with large numbers of people.
Trump has taken pride in his big campaign rallies, with crowds of people who do not wear masks or maintain social distance.
Futures for the S&P 500 fell 1.8 percent in Asian trading after the news, extending earlier losses, while barometers of risk sentiment, such as the Australian dollar and Treasury yields, dipped.
"Trump has been trailing behind Biden and he has clearly failed to narrow the gap after the first debate ... I suspect markets will lean towards the view that Biden will likely win the election," said Naoya Oshikubo, Senior Economist at Sumitomo Mitsui Trust Asset Management.
"What I am worried is that he will become even more aggressive against China after he caught the virus himself."
British Prime Minister Boris Johnson kept working in isolation for a little over a week after testing positive in late March, but then fell gravely ill and was rushed into intensive care.