Wilders said on Twitter before the verdict that he would "continue to speak the truth about the Moroccan problem".
"Today, I was convicted in a political trial which, shortly before the elections, attempts to neutralize the leader of the largest and most popular opposition party", Wilders said. "This sentence proves that you judges are completely out of touch".
About 400,000 people of Moroccan origin live in the Netherlands.
Wilders' conviction stems from a 2014 incident when he led chants at a rally expressing the desire for fewer Moroccans in his country, a sentiment shared by about half of Dutch people surveyed, according to The Washington Post. His conviction did not come with any punishment, with the court saying the conviction was enough to serve as punishment.
At the trial, prosecutors took testimony from Dutch-Moroccans who said his comments made them feel like "third-rate citizens".
Wilders, who is leading in several polls for the March elections, said he was not guilty of any wrongdoing.
"You have restricted the freedom of speech of millions of Dutch, and hence convicted everyone", he said. And so am I. "No judge, politician or terrorist will stop me", CNN reported.
In 2006, an Austrian court sentenced controversial British historian David Irving to three years in jail for Holocaust denial, over a speech and interview he gave in 1989 in which he called for an end to the "gas chambers fairy tale".
A previous attempt to prosecute Wilders for anti-Islam remarks, such as likening the religion to Nazism and calling for a ban on the Koran, ended in acquittal in 2011.
Wilders, and other far-right leaders in Europe, have seen Trump's win as a hopeful sign that fuels their anti-establishment discourse.
"This ruling protects minorities in our country from the racist poison that is seeping into our society", said anti-discrimination platform NBK, which previously filed a failed lawsuit against Wilder in 2007.
Steenhuis stressed that freedom of expression was not on trial. "We can and will do the same!"
"The judge has ruled for the first time in the Netherlands that there are limits to what even a politician can say", Pestman said. However, he was found guilty of discrimination and group insult.