Former Microsoft CEO Steve Ballmer said Tuesday he sold all his shares of Twitter, but not because he thinks the company will fail.

"I don't hold any of my Twitter shares anymore — except to the extent they are represented in index funds," Ballmer said on CNBC's "Halftime Report."

Ballmer, CEO of Microsoft from 2000 to 2014, now owns the Los Angeles Clippers. A few years back, he acquired about a 4 percent stake in Twitter at north of $25 per share. He said he sold his Twitter shares at "the recent high," suggesting it was around the time when Twitter last reached around $33 to $35.

Twitter last closed at a high of $36.60 on March 14, and last closed above $33 per share on March 19. It was trading around $30 a share on Tuesday.

"I sold really because I decided investing money is not my business," Ballmer said. "I'm in index funds, I'm in Microsoft — it keeps my life simpler."

Twitter may not fit into Ballmer's investment strategy, but his sale doesn't mean he thinks the social media company will fail.

"I think Twitter will succeed and it will move forward, but I simplified my life and I got out at a very nice price," Ballmer said.

As of midafternoon Tuesday, shares of Twitter were down 1 percent on the day but were up 24.8 percent this year.