"Its been a fun 14 years of trying to create change and donating to the donut fund!" Cuban wrote.
Cuban went onto the court and yelled at the officials after the Mavericks blew a 17-point lead in the final 5 minutes of a 129-127 loss at the Los Angeles Clippers on Wednesday. He called it "speaking his mind" in another Twitter post.
He tweeted that he would donate an equal amount to charity once he reached 2 million followers, which he is about to reach.
Cuban has been fined more than $1.5 million by the league, often for his outbursts about the officiating.
Stern is retiring on Feb. 1. Cuban had told ESPN.com he wanted one more fine before Stern left.