A wild boar interrupted prayers when it burst into the main hall of a mosque and attacked a man on Tuesday night, local media reported.
The man suffered lacerations in the attack in Sungai Buloh near Kuala Lumpur, the New Straits Times said Wednesday.
"It took us more than 30 minutes before the animal finally ran out of the mosque," a witness was quoted as saying.
The animal had also reportedly chased children outside the mosque before it was shot dead by a resident. Police were later informed of the incident.
Muslims make up 60 percent of the population of Malaysia. Pigs are viewed as unclean by Muslims and both breeding them and consuming their meat is haram or forbidden.