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 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 [Medical Center],” the statement says.
Before going on the drive, 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.
One user wrote: “Keep on fighting for us, and the entire world. We will defeat this virus.”
Another user added: “Thank you to the entire Walter Reed medical staff for taking such amazing care of our wonderful president!”
A third user said: “You look wonderful President Trump, healthy and rested.
“Everyone was sending you lots of prayers.”