David Wilson, 31, put letters through doors in the Pollokshields area, which is home to Scotland's largest Muslim community.
Wilson, from Alexandria, West Dunbartonshire, was the first person in Scotland to be convicted under the Public Order Act of inciting racial hatred.
A Crown Office spokesman said the sentence should be seen as a "warning shot" to anyone intending to promote racist views.
Extra security was in place around the court, where anti-Nazi demonstrators and BNP members gathered.
Wilson posted the leaflets through doors in July 2001 while a member of the British National Party, shortly after towns in the north of England were rocked by major violence linked to racial tensions.
The leaflets alleged that there had been attacks on white people in Pollokshields by members of the Muslim community and that the situation was likely to deteriorate.
He was found guilty on 24 October by Sheriff Linda Ruxton of distributing "threatening, insulting and abusive" literature and stirring up racial hatred, contrary to the Public Order Act.
First offender
She said the claims in the leaflet were "inaccurate" and clearly targeted at members of the Pakistani community in Pollokshields, even though they did not explicitly say so.
Sentencing Wilson, Sheriff Ruxton said: "A sentence of imprisonment is only appropriate given the nature of the offence.
"It should also serve as a strong deterrent to others, making clear that such behaviour strikes at the heart of community life and will not be tolerated."
Sheriff Ruxton said the maximum sentence available to her was six months but sentenced Wilson to four months as he was a first offender.