According to the local security officials, the incident took place in a remote village located in the outskirts of Ghazni city.
Provincial Criminal Investigation Department Chief Mohammad Qahir Nasiry confirmed the incident and said the Imam has been arrested and is in custody of the police forces.
He said the perpetrator was arrested after a complaint was lodged by the family of the child.
According to Nasiry, the Mullah Imam has confessed to his crime during the initial investigations.
Ghazni is located in the southeastern part of the country and is among the relatively volatile provinces besides criminal incidents are reported occasionally from the province.
In another incident, a man stabbed his wife, apparently due to domestic violence having links with the alleged adultery.
The local officials said the woman succumbed to her injuries sustained from the repeated stabbing by her husband.
The officials further added that the husband of the victim has been arrested and he has also confessed to his crime during the investigations.