From 1995 to 1999, Afshari was a member of Central Council of the Islamic Student Association at Amirkabir University of Technology, serving as the Secretary of the Association. From 1999 to 2004 he was a member of Central Council of the Office to Foster Unity National Islamic Student Association (Daftar- Tahkim-e Vahdat). From 1996 to 1997 Afshari was coordinator of Khatami’s Student Political Campaign, including coordination of student activities and gatherings in support of Khatami’s presidential election nationally in 30 universities. From 2000 to 2003, he was imprisoned by the Islamic Republic of Iran for political crimes, including activities against national security. 400 of these days were spent in solitary confinement.