The recall also includes the 2015 M6 convertible and 2015 M6 Gran Coupe sedan.
"The affected vehicles have a driveshaft that may have been inadequately welded during manufacturing," the NHTSA said in its recall summary. "Due to the improper weld, the driveshaft may fracture and fail, causing loss of drive to the rear wheels and a loss of propulsion.
"Additionally, if the car is turned off and exited without the parking brake applied, the car may roll. Either condition increases the risk of a crash."
No accidents or injuries are linked to the recall, BMW told federal safety regulators.
Edmunds says: Owners of these vehicles should be ready to make a service appointment with their BMW dealer in early September. But if you have an immediate concern, it's best to contact your dealer now.