It is the first such trial to be held in Afghanistan after decades of warfare.
Assadullah Sarwari has been detained since 1992, when mujahedin factions overthrew a Soviet-backed communist regime.
Prosecutors said Sarwari was arrested for conspiring against Afghanistan's Islamic government and was guilty of illegal mass arrests and executions.
Sarwari served as head of intelligence when thousands of people were killed for opposing the government.
Appearing before the national security court, Sarwari said his detention is illegal and he had no connection with war crimes.
Officials said he would be sentenced to death if found guilty.