He was also sentenced to five years deprivation of civic rights, which bars him from holding any official post, such as teaching, as well as public speaking.
Afshari can appeal both Revolutionary Court verdicts.
The activist, a member of a pro-reform student movement known as the Office to Consolidate Unity, has spent three years behind bars since 2000 including one year in solitary confinement.
In 2001, Afshari appeared on Iranian state television confessing to a plot to overthrow the clerical regime and apologising to supreme leader Ayatollah Ali Khamenei for his "mistakes".
He later said he had made the confession under duress.
Afshari was among several dissidents who drew the ire of Iranian authorities by taking part in an academic and cultural conference in Berlin in April 2000.
Political and social reforms in Iran were publicly debated at the conference, held at the Heinrich Boell Institute and called "Iran After the Elections", referring to the then newly elected reformist-dominated parliament.
Iranian state television aired footage of the conference, which was frequently interrupted by Iranian exiled dissidents who slammed the clerical regime.