The billionaire has been sued by a group of Tesla investors who say that Mr Musk’s tweet was misleading and cost them tens of millions of dollars.
Mr Musk told the jury on Monday that he had discussed taking the electric vehicle company private with entrepreneur Michael Dell, who took his own company private in 2013.
And he insisted that he “unequivocally wanted to take Tesla private,” according to Bloomberg.
Mr Musk first apologized to the jury and said he was “not at my best” as he had “trouble sleeping last night.”
But he insisted that when he tweeted about taking Tesla private, he believed that he had funding secured after meeting with officials from Saudi Arabia’s Investment Fund.
“Just as I sold stock in Tesla to buy Twitter. ... I didn’t want to sell Tesla stock but I did sell Tesla stock,” he said of his $44bn purchase of the social media platform in October, which took it private.
“My SpaceX shares alone would have meant that funding was secured,” he said of the 2018 tweets.
In the first of the 2018 tweets, Mr Musk stated “funding secured” for what would have been a $72bn buyout of the company at $420 per share. He later tweeted that the deal was imminent.
Nicholas Porritt, a lawyer for the Tesla shareholders, asked Mr Musk if he “went with 420 because it was a joke your girlfriend enjoys.”
The billionaire replied that there was “some karma” around the number, which is also a slang term for marijuana, but added he did not know if “it’s good karma or bad karma at this point.”
Mr Musk told the jury that the use of the number was a “coincidence” and represented a 20 per cent premium of Tesla’s share price in August 2018.
When the deal never materialised, Mr Musk and Tesla agreed to a $40m settlement with the Securities and Exchange Commission that allowed him to stay as the company’s CEO but forced him to stand down as company chairman for three years.
During his testimony on Friday, Mr Musk told the jury that it was “absurd” to make any connection between his tweets and changes in Tesla’s stock price.
“Just because I tweet something does not mean people will believe it or act accordingly,” Mr Musk said.
The Associated Press contributed to this report.