The recall covers 883,000 cars from the 2011 through 2014 model years.
The Korean automaker says the automatic transmission shift cable can separate from the shift lever. If that happens, the lever may not show the correct gear, increasing the risk of a crash.
Also, if the driver stops the car and puts the transmission in "park," the car may still be in gear and could roll away, injuring drivers, passengers or bystanders, Hyundai said in documents posted Wednesday by the U.S. National Highway Traffic Safety Administration. Other symptoms include an inability to start the car because it can't be shifted into park.
Hyundai has received 1,171 warranty claims about the problem, plus seven other reports with related symptoms. The documents don't say if there have been any crashes or injuries. The Sonatas being recalled were made from Dec. 11, 2009 through May 29, 2014.
The Sonata is Hyundai's second-best-selling car in the U.S. so far this year. First is the compact Elantra.
Hyundai will notify owners by letter between now and the end of September. Dealers will inspect the shift cables and repair the connection if needed.
Owners with questions can call Hyundai customer service at (800) 633-5151.