Declan McCuish, 23, posted the comment "black monkey b******" about former Gers star Sone Aluko.
He also tweeted the phrase "Are you still playing football you vile little f****** monkey" about Senegalese footballer El Hadji Diouf who also played for the team at the time.
After receiving complaints about his offensive Tweets, McCuish's home in Ibrox was raided and police found cannabis and phenazepam.
McCuish, now from Paisley, pled guilty at Glasgow Sheriff Court to posting "abusive and threatening comments" to Aluko and in relation to Diouf on February 2 and 3, 2013. He also admitted producing cannabis and possession of phenazepam.
Passing a total sentence of 12 months Sheriff Andrew Cubie branded the tweets "vile and racist" and noted that his Twitter name 1888-dec-1888, was linked to Celtic.
He told McCuish that he was part of a "small and dwindling group" that want to "cherish this kind of hatred".
The sheriff added that these comments had "no place in 21st century Scotland".
In mitigation defence lawyer Ron McKenna said that his client was suffering from a breakdown at the time of the offences and was also using drugs.