The Ninja coaster struck a tree branch shortly before 6 pm ( local time) yesterday and stopped, said Michael Pittman, a Los Angeles County Fire Department dispatch supervisor.
Televised news reports showed at least one of the cars that normally are suspended beneath a track dangling at an angle, derailed at the front.
Firefighters and park maintenance workers in harnesses could be seen removing the riders one by one from coaster cars. Others waited patiently, some talking with each other and others resting with their eyes occasionally closed.
The Ninja coaster can hold up to 28 riders.
"As you shoot down the snake-like steel track you'll grip the hillsides and blast through the trees swiftly, slicing through the landscape. Ninja pivots with precision as you narrowly miss tagging land and water, whipping around at 55 miles per hour," according to the amusement park's website.
Six Flags Magic Mountain is in the Valencia area of Santa Clarita, about 25 miles (40 kilometres) north of Los Angeles.