Raj Kumar, 27, claimed he was drunk and could not remember anything following the shocking incident in India, where cows are considered sacred.
He is being held on animal cruelty charges, said police in Ayodhya, Uttar Pradesh.
Workers lay in wait for the offender after seeing a number of cows being sexually assaulted, assuming he would return to commit the offences again.
Then they “brutally thrashed him” before handing him over to police, according to local reports.
Police inspector Jagdish Upadhyay said: “The accused was identified as Raj Kumar who works as a contractual labourer.
“He was under the influence of alcohol when he was brought to the police station.”
Shelter volunteers claim they saw Kumar having “unnatural sex” with five cows while scanning CCTV installed a few days earlier.
“They came across this footage of a man involved in the act,” the inspector said.
“Since then, volunteers started keeping vigil.”
Kumar is said to have abused the cows at the Karatliya Baba Ashram shelter.
Tearful local priest Ram Das said: "CCTV footage shows the man doing dastardly acts with cows one by one.
“We have caught him and brought to the police station. The act has left us distraught, we are unable to understand this.”
Cattle shelters in India - known as Gaushalas - protect the animals because of their religious significance in Hinduism.
Kumar, of Gonda in Nawabganj five miles away, told police: "I was drunk. I don't know what I did. "
Last July, eight men caused outrage for gang-raping a pregnant goat in Mewat in the northern state of Haryana.
Do not miss out on the latest news. Join the Standard Digital Telegram channel HERE.