The man was killed early on Sunday, according to a spokesman for the US Secret Service.
Although Trump often spends weekends at his resort, he was at the White House when the breach occurred around 1:30am.
The man had a petrol can and a shotgun, authorities said.
Investigators identified him as 21-year-old Austin Tucker Martin of North Carolina, according to the FBI, and authorities said his family had recently reported him missing.
He's believed to have bought his shotgun while driving south, Secret Service spokesman Anthony Guglielmi said, and a box for the weapon was later discovered in the man's vehicle.
Investigators have not identified a motive. However, Trump has faced threats to his life before, including two assassination attempts during the 2024 campaign.
The man entered the north gate of the property as another vehicle was exiting and was confronted by two Secret Service agents and a Palm Beach County sheriff's deputy, according to Palm Beach County Sheriff Ric Bradshaw.
"He was ordered to drop those two pieces of equipment that he had with him. At which time he put down the gas can, raised the shotgun to a shooting position," Bradshaw said at a brief press conference. The two agents and the deputy "fired their weapons to neutralise the threat".
The Moore County Sheriff's Department in North Carolina said a relative of Martin's reported him missing from his North Carolina home early on Sunday morning.
Investigators are working to compile a psychological profile. Asked whether the man was previously known to law enforcement, Bradshaw said "not right now".
The FBI encouraged residents who live near Mar-a-Lago to check any security cameras they may have for footage that could help investigators.
In a post on X, FBI Director Kash Patel said the bureau would be "dedicating all necessary resources" to the investigation.
Braeden Fields, Martin's cousin, reacted with disbelief, saying they had grown up together.
He described Martin as quiet, afraid of guns, saying he came from a family of avid Trump supporters.
"He's a good kid," Fields, 19, said.
"I wouldn't believe he would do something like this. It's mind-blowing," Fields said.
Martin worked at a local golf course and would send money to charity, he said.
"He wouldn't even hurt an ant. He doesn't even know how to use a gun," Fields said.
"We are big Trump supporters, all of us. Everybody," Fields said, but his cousin was "real quiet, never really talked about anything".
White House press secretary Karoline Leavitt said in a post on X that "the United States Secret Service acted quickly and decisively to neutralize a crazy person, armed with a gun and a gas canister, who intruded President Trump's home".
In the past year, there has been the assassination of conservative activist Charlie Kirk, the assassination of the Democratic leader in the Minnesota state House and her husband and the shooting of another lawmaker and his wife; and an arson attack at the official residence of Pennsylvania Governor Josh Shapiro.
Five days ago, a Georgia man armed with a shotgun was arrested as he sprinted toward the west side of the US Capitol. Trump is scheduled to deliver his State of the Union address there on Tuesday night.