Purnama was "found to have legitimately and convincingly conducted a criminal act of blasphemy, and because of that we have imposed two years of imprisonment," presiding judge Dwiarso Budi Santiarto told the court.
The five-judge panel ordered the minority Christian governor to be detained immediately. Purnama had been free during the trial while he was seeking re-election.
Purnama said that he would appeal the court's guilty verdict and sentence.
Tuesday's ruling was a surprising outcome as prosecutors had requested a one-year jail term suspended for two years. The maximum sentence for blasphemy in Indonesia is five years in prison. Outside the court, his supporters wept at the news amid jubilant cheers from conservative Islamic groups.
Another judge on the panel, Abdul Rosyad, said the court handed down a harsher sentence because Purnama "didn't feel guilt" and that his comments "caused unrest in society and wounded the feelings of Muslims," he said.
The head judge Santiarto also denied that the case had political aspects and said the trial was purely criminal. Purnama lost a re-election bid in last month's election to Muslim candidate, Anies Baswedan.
The controversy began last September when Purnama quoted a passage from the Quran while campaigning for re-election. He told local residents that his political opponents had "lied" to them by saying the Quran prohibited them from voting for a non-Muslim governor.
An edited video of the speech was published online, prompting hundreds of thousands of Muslims to demand his prosecution during massive rallies in October, November and December.
Purnama, who was the first ever ethnic Chinese Christian to lead Jakarta, saw his polling numbers drop considerably following the blasphemy accusations.
The trial had largely been seen as a test of religious tolerance in the world's largest Muslim-majority country, with Tuesday's decision raising questions about Indonesia's reputation for practicing a moderate form of Islam.
rs/rt (AP, AFP, dpa)