Lo Chi-cheng, formally a colonel in the military intelligence bureau, was convicted of selling classified information to China multiple times between 2007 and 2010 in return for about USD 250,000, the high court said.
A military tribunal in 2011 had sentenced Lo to life in prison, which he appealed. The high court reduced his sentence on the grounds that he had confessed and shown remorse, a court official said.
He can also appeal today's ruling.
Media reports say Lo sold lists of spies stationed on the mainland and other secret information to China, which compromised crucial Taiwanese intelligence networks and endangered the lives of agents.
Also Read
Lo was recruited by a Taiwanese businessman, who was sentenced to three years and six months in jail for his role in the case in a separate ruling.
Taiwan has been rocked by a series of espionage scandals in recent years, despite warming ties with China under current Taiwanese President Ma Ying-jeou.
A retired vice admiral was jailed for 14 months last year for collecting confidential military information for China, while an army general who headed an intelligence unit was sentenced in 2011 to life for spying for China.