Authorities have identified the suspected shooter as Esteban Santiago, 26, from Anchorage, Alaska.
Santiago served in Iraq with the National Guard before being demoted and discharged last year for poor performance.
His brother said he had recently been getting psychological treatment.
The Associated Press reported a law enforcement official saying that Santiago had walked into the FBI office in Anchorage in November to say that the US government was controlling his mind and making him watch Islamic State videos.
Santiago had been questioned by agents before police took him for a mental health evaluation but the official said that he had not seemed intent on hurting anyone.
On Friday he had arrived at Ft Lauderdale just before 1pm local time (6pm UK time) on a flight from Alaska.
Reportedly dressed in a Star Wars t-shirt, he took a 9mm semi-automatic handgun from his checked luggage and began firing on people.
On Facebook, Broward County commissioner Chip LaMarca wrote the suspect had been carrying a gun in his luggage, adding: "He claimed his bag and took the gun from baggage and went into the bathroom to load it. Came out shooting people in baggage claim."
Ari Fleischer, a former White House press secretary, said he was at the airport and "everyone was running" when shots were fired.
Mark Lea told MSNBC: "He just kind of continued coming in, just randomly shooting at people, no rhyme or reason to it."
As well as the five dead, eight others were injured.
Santiago was taken away by police after throwing his gun down and lying spread-eagle on the ground, according to a witness.
Sheriff Scott Israel told a news conference that it was uncertain whether the shooting was an act of terror, and the suspect is now being interviewed by FBI agents and detectives.
Florida governor Rick Scott told reporters the shooting was "a senseless act of evil".
Fort Lauderdale-Hollywood International Airport was closed indefinitely.
Flying with guns in the US is legal as long as they are kept in a locked hard-sided container as checked baggage only, under TSA rules. Ammunition is not allowed in cabin baggage but is allowed in checked baggage.