Won Sei-Hoon, who led the National Intelligence Service (NIS) from 2009 to 2013, orchestrated an illicit smear campaign to sway voters in favour of the then-ruling conservative party, the Seoul High Court said.
South Korea only fully embraced democracy in the 1990s and its intelligence services have long been accused of interfering in elections in favour of the incumbent authorities.
Moon lost the 2012 poll to Park Geun-Hye but was elected earlier this year after her impeachment over a corruption scandal.
Won had violated the political neutrality of the NIS by "spreading pro-government opinions through online postings", the Seoul High Court said in its ruling.
Also Read
Two other former NIS officials convicted of colluding with Won were given suspended sentences.
Wednesday's ruling was the latest stage in a long-running legal saga.
Won was first convicted in 2014 but only given a suspended sentence. Both sides appealed and the high court imposed a three-year term, only for the Supreme Court to overturn that decision and send it back for re-hearing.
Disclaimer: No Business Standard Journalist was involved in creation of this content