Electric vehicle (EV) stocks may have been a hot topic over the past year or so, but you'd have barely heard Warren Buffett make a move on EVs. However, the legendary investor has a favorite EV stock -- and he's selling it.

Yes, you read that right.

At a time when global sales of EVs are booming and they're only getting started, Buffett just sold a stake in BYD (BYDDY 0.37%). To be sure, Buffett also owns shares in General Motors, which is also investing big money into EVs, but China-based BYD is the only pure-play EV stock that Buffett has ever owned.

Ironically, BYD is firing on all cylinders -- it's larger than you might think -- and Buffett is a long-term investor. So why is he selling shares in the EV maker, and is his move a signal for you to sell BYD stock too?

The Buffett-BYD connection no one knows about

BYD caught Buffett's attention long before anyone had even heard about the company. Buffett's Berkshire Hathaway (BRK.A -1.05%) (BRK.B -0.83%) first bought a stake in BYD in 2008 when the company only made batteries and was yet to launch its first electric vehicle.

BYD has come a long way since, and Buffett's investment in the company has grown manifold. BYD sold 593,745 new energy vehicles (or NEVs, which include all-electric, plug-in hybrid, and fuel-cell vehicles) in 2021, a record for the company. BYD sells all-electric and plug-in hybrids. 

Buffett's investment of around $230 million in BYD in 2008, meanwhile, is worth almost $7.2 billion as of this writing.

In a Hong Kong exchange filing, Berkshire Hathaway revealed it had sold 1.33 million shares in BYD on Aug. 24 at an average price of around $35.3 per share, and cut its stake in the EV maker from 20.04% to 19.92%.

It may look like a small stake sale, but investors pay attention when Buffett makes a move, especially when the company in question is in a business that's red-hot right now.

With China's EV market booming and BYD performing exceptionally well, it's hard to see why Buffett sold shares in the EV maker. After having owned the stock for nearly 14 years now, it could simply be a case of profit-booking. If you're an investor in BYD, though, there's no reason why you'd want to take profits now.

How BYD is giving Tesla tough competition

BYD just released its second-quarter earnings on Aug. 29, and it continues to stun the markets with stellar numbers.

BYD's deliveries in the second quarter jumped nearly 255% to 355,021 units, driving its revenue up by almost 68% year over year. In the six months ended June 30, BYD's net income tripled to 3.6 billion yuan, or roughly $521 million.

It's worth noting that BYD stopped the production and sale of gasoline vehicles in March this year to focus fully on electric vehicles.

In fact, BYD is now the world's largest NEV seller. Although multiple news portals claimed BYD had dethroned Tesla (TSLA -2.71%) in the first half of 2022 based on delivery numbers, it's important to understand that Tesla still sold more all-electric vehicles than BYD during the period, and BYD's total delivery numbers outshone Tesla's because it included plug-in hybrids.

Chart of global market share of electric car manufacturers in the first five months of 2022, with Tesla leading and BYD third.

Yet BYD could catch up with Tesla on all fronts in the coming years given its edge in China alone. BYD is now the largest NEV producer in China, with a 24.7% market share in the first half of 2022, according to data from the China Association of Automobile Manufacturers. China easily topped EV sales in 2021, selling nearly five times more EVs than the second-largest market, Germany. 

Why BYD remains a top EV stock to own

Often, the market bets on a stock based on the conviction of billionaire investors like Buffett, and starts to feel nervous when such investors sell part of their shares. Just following legendary investors, however, is not a savvy idea, especially when you have conviction about a stock.

BYD's operational performance leaves little room for complaints, and it has big growth plans that aren't limited to China. BYD sells electric buses worldwide, including in the U.S. It already sells electric cars globally, including in rapidly growing markets like Norway and upcoming EV markets like India, and is one of the world's largest EV battery manufacturers.

With BYD also announcing plans to enter several new passenger car markets like Japan, Sweden, and Germany, this is one Buffett stock I wouldn't sell right now