Space pioneer Elon Musk’s company suffered a major setback Sunday when its Falcon 9 rocket carrying an unmanned cargo capsule had a catastrophic failure, breaking up shortly after liftoff from Florida’s Cape Canaveral Air Force Station.

After a flawless countdown in perfect weather, and with all nine engines of the lower stage operating normally as the rocket climbed to an altitude of 27 miles, officials said sensors revealed excessive pressure buildup in a liquid-oxygen tank in the upper stage a little more than two minutes...