Stu Jackson, the league's executive vice president of basketball operations, announced the penalty Tuesday in a news release.
The incident occurred on Saturday after Stoudemire responded to a fan's tweet that read: "You better come back stronger and quicker to make up for last season." The tweet also had an obscenity at the end of the sentence.
Stoudemire replied to the fan with a direct message that included an anti-gay slur and profanity.
The fan then took a screen capture of Stoudemire's message and tweeted it. Multiple blogs reposted it.
Stoudemire apologized to the fan Sunday morning by sending him another direct message, which read: "I apologize for what I said earlier. I just got off the plane and had time to think about it. Sorry bro. No Excuses. Won't happen again."
The fan tweeted that message as well.
The league's actions were in accordance with its recent crackdown against anti-gay slurs.