David Einhorn's hedge fund Greenlight Capital said the firm's bet against Tesla shares "was our second biggest loser" in the most recent quarter. The billionaire also said in the Greenlight letter he was "happy that his Model S lease ended" and was replacing the car because of problems with the technology.

Tesla CEO Elon Musk seized the opportunity on Twitter, retorting that he would send Einhorn "a box of short shorts to comfort him through this difficult time."

Greenlight lost 5.4 percent in the second quarter, bringing the performance of its funds to a year-to-date loss of 18.3 percent, according to its investor letter obtained by CNBC on Tuesday. In the letter, Einhorn questioned Tesla investors, saying shareholders seemed to be backing the long-term growth of the company while Tesla appears to be focusing on "very short-term goals."

"We wonder whether surge production techniques to support self-congratulatory tweets are economically efficient ways of ramping production, or whether customers will be happy with the quality of a car rush through production to prove a point to short sellers," the letter said.

"The most striking feature of the quarter is that Elon Musk appears erratic and desperate," Einhorn's letter added.

Musk has been active on Twitter this year, fighting back against investors betting against his stock and other detractors, often with controversial comments.