While in the car, he waved at supporters and reporters in the area. He later returned to hospital, where he is receiving treatment for COVID-19, the White House announced.
The White House has released a statement about Mr Trump’s brief drive outside the hospital where he is being treated for COVID-19.
“President Trump took a short, last-minute motorcade ride to wave to his supporters outside, and has now returned to the Presidential Suite inside Walter Reed,” the statement says.
Before going on the drive, Mr Trump tweeted a video saying he was going to “pay a little surprise” to his supporters.
In the clip, he said: “I am not telling anybody but you, but I am about to make a little surprise visit.
“So, perhaps I will get there before you get to see me, but when I look at the enthusiasm…
“And we have enthusiasm like probably no one has ever had.”
He added: “I learned a lot about Covid, I learned it by really going to school – this is the real school.”
Twitter users responded to Mr Trump’s tweets to send him their well-wishes and messages of support after his COVID-19 diagnosis.
However, critics pointed out President Trump’s apparent disregard for preventive measures after he contracted the infectious disease.
Chief of Disaster Medicine and Walter Reed Attending Doctor James Phillips condemned Mr Trump’s actions in a tweet shared with his 21,000 followers.
He wrote: “That Presidential SUV is not only bulletproof, but hermetically sealed against chemical attack. The risk of COVID-19 transmission inside is as high as it gets outside of medical procedures.
In a statement, White House Correspondents’ Association President Zeke Miller wrote: “It is outrageous for the president to have left the hospital — even briefly — amid a health crisis without a protective pool present to ensure that the American people know where their president is and how he is doing.”
“The irresponsibility is astounding. My thoughts are with the Secret Service forced to play.”
Prior to the surprise visit, Mr Trump took to Twitter to thank supporters who were standing outside Walter Reed hospital.
He wrote: “I really appreciate all of the fans and supporters outside of the hospital.
“The fact is, they really love our Country and are seeing how we are MAKING IT GREATER THAN EVER BEFORE!”