The force of the blast shook buildings several miles away.
SpaceX said "an anomaly" had occurred while the rocket was being loaded with fuel. No-one was injured, it said.
The rocket's payload, an Israeli-built communications satellite for Facebook due to launch on Saturday, was also destroyed, it added.