Elon Musk should be removed from Tesla as CEO for his comments to the Securities and Exchange Commission, CNBC's Jim Cramer contended Tuesday.

Musk goes after the SEC "as if it's funny," Cramer said on "Squawk Box." "If this guy is going to attack the SEC, how about removing him? He attacked the SEC."

"I love him. He's a genius," Cramer added. "[But] he should be removed."

Tesla did not immediately respond to CNBC's request for comment on Cramer's remarks.

Shares of Tesla were lower Tuesday after the SEC asked a judge to hold Musk in contempt for violating a settlement deal. They cited an "inaccurate" Feb. 19 tweet from Musk about production.

In response, Musk lashed out against the agency, saying in a tweet, "Something is broken with SEC oversight."

tweet 1

The SEC had settled charges with Musk and Tesla over the CEO's aborted bid via Twitter to take the company private last August. Musk was forced to relinquish his chairman title, pay a hefty fine, and get pre-approval for his future tweets.

Cramer has been critical of Musk ever since the CEO's Aug. 7 take-private tweet stunned the financial community and Washington regulators. Musk abandoned the take-private idea on Aug. 24.

Following a bizarre Aug. 16 interview with The New York Times, Musk's actions were under scrutiny again three weeks later after he appeared to smoke marijuana and drink whiskey during comedian Joe Rogan's podcast.

At the time, Cramer said Musk's "stunts" were ill-advised, and recommend the board put Musk on medical leave.

Cramer on Tuesday joked that Tesla should put some sort of software of Musk's phone the prevents him from tweeting. "He should just talk to Siri," Cramer said, referring to Apple's virtual assistant.

— CNBC's Sara Salinas contributed to this report.