Twelve miles up the capsule detached from the rocket, moments before the Falcon 9 burst into a fireball.
The parachutes opened, and the capsule splashed down into the waters off the coast of Florida.
NASA administrator Jim Bridenstine called the dramatic emergency landing a successful test of a crucial abort system.
(SOUNDBITE) (English) NASA ADMINISTRATOR JAMES BRIDENSTINE, SAYING:
"Another amazing milestone is complete for our very-soon-to-be project, which is launching American astronauts on American rockets from American soil for the first time since the retirement of the space shuttles.
(SOUNDBITE) (English) SPACEX FOUNDER ELON MUSK, SAYING:
"As far as we can tell, thus far, it was a picture-perfect mission."
Founded by Elon Musk, SpaceX was awarded $2.5 billion by NASA in 2014 to develop a capsule system capable of ferrying astronauts to a space station.
(SOUNDBITE) (English) SPACEX FOUNDER ELON MUSK, SAYING:
"I'm super fired-up. This is great. It's really great."
SpaceX's Crew Dragon Capsule can carry 7 astronauts.
Sunday's test involved two test dummies outfitted with sensors to collect data on the effects astronauts would face during an aborted launch.
NASA hopes to have a capsule ready to take people into space later this year