A Seoul district court ruled that the defendant, identified only by his surname Lee, had acted illegally to "manipulate public opinion" by organising an online smear campaign against the opposition candidate, Moon Jae-In.
Lee, the former head of the psychological warfare department in the army's Cyber Command, organised around 100 subordinates to write tens of thousands of posts on Internet sites and social networks criticising Moon, who was narrowly defeated in the 2012 poll by the current president, Park Geun- Hye.
Lee was also convicted of ordering an attempted cover-up after allegations first emerged in 2013 that some officers in the military and the National Intelligence Service (NIS) had conspired to smear Moon's candidacy.
In February, former NIS chief Won Sei-Hoon was jailed for three years for his part in the scandal.