State TV broadcast festivities in Vahdat, close to the capital Dushanbe, showing citizens holding aloft paintings of Rakhmon riding a white horse and wading through wheat fields.
Rakhmon, 64, speaking at the occasion, called the war "a result of provocations and intrigues by hostile forces, (both) internal and external."
"This terrible event... Caused the deaths of tens of thousands of residents of the country, and the flight and migration of more than one million of our compatriots," Rakhmon said.
The peace agreement, struck between government forces loyal to Rakhmon and the United Tajik Opposition, which included Islamist factions in its ranks, was signed in Moscow on June 27, 1997, with UN backing.
More From This Section
Rakhmon has been widely criticised for consolidating power at the expense of the terms of the agreement, which stipulated that 30 per cent of government positions should be provided for the opposition.
In 2016, a Tajik court gave life sentences to key figures in the Islamic Renaissance Party of Tajikistan, a group the government had banned the previous year and accused of plotting to overthrow the government.
Advocacy groups regularly criticise systematic human rights abuses in Tajikistan, where Rakhmon now faces no real opposition and is the subject of a growing personality cult.
Russian troops helped guard Tajikistan's 1,300-kilometre border with Afghanistan after the country's independence but handed full control of the frontier back to Tajikistan in 2005.
Moscow still maintains a military base in the country and roughly half of all working age Tajik males are believed to earn their living in Russia.