The men stormed the grounds of the mosque in the western city of Herat, but security guards shot dead one of them and the other blew himself up before reaching the hall where worshippers were praying, provincial governor spokesman Jilani Farhad told AFP.
At least one worshipper was killed and eight others were wounded in the attack on Nabi Akram mosque, Farhad said, adding all the victims were civilians.
The casualty toll was confirmed by deputy police chief Aminullah Amin.
The area around the mosque was cordoned off by police and ambulances were seen rushing victims to hospitals in the city, an AFP photographer at the scene said.
ISIS's local franchise in Afghanistan claimed an attack in Kabul last Wednesday that killed at least 33 people and wounded dozens more, many of them teenagers.
A suicide bomber blew himself up among a crowd of people celebrating Nawrooz, the Persian new year holiday, in a heavily Shiite neighbourhood.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.