TOKYO—Toyota Motor Corp. sold its stake in Tesla Motors Inc. some time last year, the company said, formally ending a partnership between the car makers.

A spokesman for the Japanese car maker on Saturday declined to say when the transaction occurred or how much Toyota made from the sale. But Tesla shares have been on a tear, rising more than 50% in the past year.

Toyota...