The accident was the third in less than a year involving US and Russian supply ships bound for the International Space Station, and raised new concerns about the flow of food and gear to the astronauts living in orbit.
Skies were sunny and clear for the 10:21 am (1421 GMT) launch of the gleaming white Falcon 9 rocket that was meant to propel the Dragon cargo ship on a routine supply mission, the seventh for SpaceX so far.
But two minutes, 19 seconds into the flight, contact was lost. Live television images from SpaceX's webcast and Nasa television showed a huge puff of smoke billowing outward for several seconds, and then tiny bits of the rocket falling like confetti against a backdrop of blue sky.
"The vehicle has broken up," said Nasa commentator George Diller.
SpaceX's live webcast of the launch went silent as the rocket exploded.
Moments later, a SpaceX commentator said "there was some kind of anomaly," and noted that the rocket had ignited its nine Merlin engines and reached supersonic speed.
Later, on Twitter, Musk said the Falcon 9 "experienced a problem shortly before first stage shutdown," referring to the phase of flight before the cargo ship would have been able to separate from the first stage of the rocket and reach orbit.
The problem appeared to be linked to excessive pressure in the liquid oxygen tank, wrote Musk, a lifelong space enthusiast who also heads Tesla Motors.
An investigation into the cause is ongoing.
The loss came as a surprise to many who have followed Musk's California-based company through 18 successful launches in a row of its Falcon 9.
Competitor Orbital Sciences lost its Antares rocket and Cygnus cargo carrier in an explosion in October, and a Russian Progress supply ship was lost after liftoff in April.
The Dragon cargo ship was carrying 4,000 pounds (1,800 kilograms) of gear to the space station, including a large parking space - known as an International Docking Adaptor - designed to make it easier for an array of commercial crew spacecraft to dock at the orbiting lab in the future, a spacesuit, and a series of experiments to grow lettuce and study worms in space.
"This is a blow to us. We lost a lot of important research equipment on this flight," said Nasa Associate Administrator for Human Exploration Bill Gerstenmaier.
Nasa administrator Charles Bolden said the US space agency was "disappointed" at the loss but that the space station has "sufficient supplies for the next several months."
A Russian Progress supply ship is scheduled to launch July 3, followed in August by a Japanese HTV flight, Bolden said.
"Orbital ATK, our other commercial cargo partner, is moving ahead with plans for its next launch later this year."
Marco Caceres, a rocket industry analyst with the Teal Group, said the accident forces SpaceX, which has a billion-dollar-plus contract with Nasa for supplying the ISS and is also competing with Boeing to send astronauts there by 2017, to launch again quickly.
"The moment they launch again successfully, this accident starts to fade into history really quickly. The longer they wait to launch again, the more people start talking about, 'Maybe we were too overconfident about SpaceX,'" he told AFP.
Three men are currently living at the space station, and Nasa said the crew is stocked with food and supplies for the next four months.
Russian cosmonaut Mikhail Kornienko and American astronaut Scott Kelly began their year-long mission in orbit back in March.
"Today was a reminder spaceflight is hard," Kelly said on Twitter. "Tomorrow is a new day."
Earlier Sunday, Russian cosmonaut Gennady Padalka, the 57-year-old station commander, set a new world record when he became the person who has officially spent the longest amount of cumulative time in space - 804 days.
His career includes one trip to the Mir Space Station and four to the ISS.