SpaceX's Falcon 9 rocket and Crew Dragon spacecraft launched from Kennedy Space Center at Cape Canaveral, Florida. The spacecraft was unmanned, although the Crew Dragon's cabin is built to hold seven people.
The escape system is "a first of its kind," NASA spokeswoman Marie Lewis said on the launch broadcast.
The mission was intended to "trigger a launch escape shortly after liftoff and demonstrate Crew Dragon's capability to safely separate from the rocket in the unlikely event of an in-flight emergency."
NASA's commercial crew program manager, Kathy Lueders, said the launch abort test was "our last open milestone" before allowing SpaceX to launch Doug Hurley and Robert Behnken to the International Space Station.
She said that could happen as soon as March.
The test was supposed to take place on Saturday, but windy weather and rough seas in the recovery area caused a delay. The capsule splashed down around 10 minutes after launch in the Atlantic Ocean, where a recovery team was waiting. The recovery operation was expected to take around two hours.
For roughly $50, anyone could buy a ticket to watch the in-flight abort test from the bleachers of Kennedy Space Center's main visitor complex.
Eight thrusters powered the Crew Dragon away from the Falcon 9 rocket.
"You can think of it as a rocket on top of a rocket," Lewis told viewers.
Before launch, Musk said the mission was "pushing the envelope in so many ways."
Hurley and Behnken, the NASA astronauts assigned to the first SpaceX crew, monitored the flight from the firing room, including the capsule recovery effort They took part in a dress rehearsal Friday, suiting up and heading to the launch pad.
NASA astronauts have not launched from the U.S. since 2011 when the space shuttle program ended.
The Associated Press contributed to this report.