The agent walked on stage as Mr Trump was speaking and whispered in his ear.
Mr Trump was heard to say “Oh!” and “What’s happening”, as he left the room. The White House was placed on lockdown during Monday’s incident.
The president returned nine minutes later to say the situation was under control and a man had been shot.
The US Secret Service confirmed the incident, saying there had been “an officer-involved shooting at 17th Street and Pennsylvania Ave”.
It said “a male subject and a USSS officer were both transported to a local hospital”, adding that “at no time during this incident was the White House complex breached or were any protectees in danger”.
President Trump told reporters he believed the US Secret Service had shot a suspect, who was armed “from what I understand”.
He said did not know if the person harboured any ill intentions towards him.
“It might not have had anything to do with me,” the president said.
Mr Trump acknowledged it was an unusual situation, but praised the professionalism of the USSS.
A journalist asked Mr Trump if he was rattled by the events.
“Do I seem rattled?” he replied.
The president added: “It’s unfortunate that this is the world, but the world’s always been a dangerous place. It’s not something that’s unique.
“The world has been, if you look back over the centuries, the world has been a dangerous place, very dangerous place, and it will continue, I guess, for a period of time.”
He told journalists he was escorted to the Oval Office outside the briefing room during the incident.
Content: BBC