Declan McCuish, 23, posted the comments about former Gers stars Sone Aluko and El Hadji Diouf.
After receiving complaints about his offensive tweets, McCuish's home in Ibrox was raided and police found cannabis and phenazepam.
McCuish, now from Paisley, pleaded guilty at Glasgow Sheriff Court to posting "abusive and threatening comments" to Aluko and Diouf on February 2 and 3, last year.
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".
The court heard McCuish continued making racist comments after a member of the public responded to his tweets.
Two Twitter users, one in Northern Ireland and one in England reported the racist remarks posted on a social networking site.
Police checked McCuish's social networking site and saw he had posted his home address which led officers to his door.
A search warrant was granted and his home was raided and drugs found.
Defence lawyer Ron McKenna said that his client was suffering from a breakdown at the the time of the offences and was using drugs.
He added that McCuish described his actions as "disgusting" and accepts full responsibility for what he has done.