India, April 17 -- For German luxury-car makers, being first to fail is proving valuable when it comes to electric vehicles. After a bruising initial crack at bringing EVs to market, BMW AG is lapping its rivals.

In 2008, BMW engineers set out to develop an electric city car from scratch. Five years later, the company introduced the i3, a quirky four-seater with rear-hinged back doors and a frame made with carbon fiber. The carlooked unlike anything else in its portfolio, but with its steep sticker price and limited range, sales were muted. Disillusioned, BMW slowed its EV plans.

Years spent soul-searching led to criticism that BMW was stalling on EVs. Lately, though, the company has been hitting the right notes with a much less radical...