The suspect has been named as Nikolas Cruz, 19, and is a former student at the school who had been expelled.
As the attack unfolded students were forced to hide as police swooped in on the building.
It is one of the deadliest school shootings since 26 people were killed at a Connecticut school in 2012.
Broward County Sheriff Scott Israel told reporters Cruz killed three people outside the school, before entering the building and killing another 12.
Two people later died after being taken to hospital.