The real-life 'Peppa Pig' show was originally uploaded to the Wouzee website by the officers themselves but has since been widely shared on social media.
It shows two local policemen who have parked their patrol car next to a pig pen.
One of them gets out of the vehicle and starts spraying pigs with his regulation-issue canister while the other laughs. Some pigs run away while others sneeze and shake their heads.
The officer's partner can be heard complaining that the spray had drifted in his direction.
"You moron, I think it's come over here," he says.
The Spanish edition of the Huffington Post newspaper reported that the video was recorded some years ago in the village of Sencelles but that the officers have since been transferred to other districts.
Spanish animal rights group PACMA have filed an official complaint against the policeman in the video on the grounds of "the possible crime of animal abuse".
"We hope that the maximum penalty is applied against the two officers, who should be defenders of the laws that protect animals in Spain," the group said in a statement.
Article 337 of Spain's criminal code outlines sentences of six months to two years imprisonment for animal cruelty.