A huge plume of black smoke could be seen over the Kennedy Space Centre at Cape Canaveral in Florida. SpaceX leases the launch pad from Nasa.
The Falcon-9 rocket created by Elon Musk's SpaceX has notched 26 successful launches and only one previous failure since its first launch in 2010.
The explosion occurred during the pre-launch stage of tests and no one was injured.
In a statement the space company said: "SpaceX can conform that in preparation for today's standard pre-launch static fire test, there was an anomaly on the pad resulting in the loss of the vehicle and its payload. Per standard procedure, the pad was clear and there were no injuries."
It turns out that payload included Facebook's first ever satellite, which was due to be launched into orbit by the rocket.
Facebook founder Mark Zuckerberg revealed this week the Amos 6 satellite was being sent into space to bring internet connections to remote locations in Africa as part of its internet.org initiative.
The social network is working with French satellite operator Euelsat on the project.
Zuckerberg said he was disappointed that the launch failure destroyed the satellite. In the post on Facebook he said:
"As I'm here in Africa, I'm deeply disappointed to hear that SpaceX's launch failure destroyed our satellite that would have provided connectivity to so many entrepreneurs and everyone else across the continent.
Fortunately, we have developed other technologies like Aquila that will connect people as well. We remain committed to our mission of connecting everyone, and we will keep working until everyone has the opportunities this satellite would have provided."
Meanwhile Musk Tweeted an update:
Loss of Falcon vehicle today during propellant fill operation. Originated around upper stage oxygen tank. Cause still unknown. More soon.— Elon Musk (@elonmusk) September 1, 2016
Images from a local Nasa webcam in the area showed thick black smoke billowing.
What you need to know