Routh is said to be a resident of Hawaii, worked as a construction worker in North Carolina and has tried to recruit fighters in support of Ukraine in its defence against Russian invasions.
The Federal Bureau of Investigation (FBI) said it was investigating the incident as an "attempted assassination".
"The FBI has responded to West Palm Beach, Florida, and is investigating what appears to be an attempted assassination of former President Trump," the agency said in a statement.
Investigators found an AK-47 style rifle, two backpacks filled with ceramic tile and a GoPro camera that he had abandoned.
This was a second assassination attempt on Trump in just more than two months.
The first was in Butler, Pennsylvania, on July 13 when he was hit in the right ear.
The shooter, who was operating by himself, was killed by a law enforcement sniper.
The Sunday incident took place at the Trump International Golf Club in West Palm Beach around 1:30 p.m.
Investigators said a US Secret Service agent moving ahead of the former President to secure the area noticed a gun sticking out from a portion of the thick foliage around the periphery of the Golf Course.
The agent went in that direction and it was not clear yet if the suspect had opened fire. But he was about 350 to 500 yard behind -- between the fifth and sixth holes -- which was not out range for the scape on the rifle -- between.
A witness saw the suspect, investigators said, took a picture of the car and the registration plate and he was pulled over shortly and taken into custody.
"There were gunshots in my vicinity, but before rumours start spiralling out of control, I wanted you to hear this first: I AM SAFE AND WELL!" Trump said in a statement.
“Nothing will slow me down. I will NEVER SURRENDER!"
The White House said in a separate statement that US President Joe Biden and Vice-President Kamala Harris, who are both in Washington D.C., had been briefed.
"The President and Vice-President have been briefed about the security incident at the Trump International Golf Course, where former President Trump was golfing. They are relieved to know that he is safe. They will be kept regularly updated by their team."
Harris said in a post on X she is "glad" the former President is safe.
"I have been briefed on reports of gunshots fired near former President Trump and his property in Florida, and I am glad he is safe. Violence has no place in America."
The shooting is reported to have taken place near his Palm Beach golf course.
President Trump was on course and shots were fired from the trees on the periphery, CNN said.
The US Secret Service personnel returned fire in that direction.
--IANS
Read More International News