Seyed Abdolkarim was taken in by officers after police were told he had married the child, named only as Gharibgol, in a religious ceremony.
The child was reportedly sold by her father who was also arrested by police after they claimed he exchanged her for the goat, along with rice, tea, sugar, and cooking oil.
He said he had been struggling to look after the family, and that exchanging his daughter meant he gained food and lost a mouth to feed.
The footage above was taken by Fawad Ahmady working for The Observers , and shows the arrest of Gharibgol’s father in his village as local women attacked him and beat him up.
He said that Abdolkarim had promised he wouldn't sleep with Gharibgol until she was 18.
Following the marriage, the respected imam Abdolkarim was said to have taken his new wife to a relative's house in Firozkoh, in Ghor province, as his daughter.
Mr Ahmady writes: "So he asked the mullah, 'she’s not your daughter?'
"The mullah replied, 'no, she’s my wife; her father gave her to me'. The host told a friend, who called the local women rights bureau for Ghor province."
Tests carried out by the hospital in Ghor show that "there was no sexual intercourse".
The child is currently being housed in a safe location with her mother.
The province's women’s rights bureau intends to ensure a divorce and the removal of the father's parental rights, but it will be a complex process as another imam must carry out the divorce - which is frowned upon in the culture.
The arrangement has gone viral in Afghanistan where the law states that women are permitted to wed from 16 and men from 18 - but influential imams can escape punishment, according to Mr Ahmady.