The company says that in rare cases a battery cable covering in the trunk was incorrectly installed.
The defect could prevent the car from starting and in extreme cases could lead to a fire. BMW says it knows of no accidents or injuries from the defect.
The company said owners will be notified by letter and that the repair should take about 30 minutes.
The recall affects 290,000 cars in Germany and 1.3 million worldwide.