Farmer Tirath Ram, a resident of Gajoth village here, had reportedly lit the fire to keep the shed warm when at least 15 goats, two bulls and a horse died, police said.
Ram was devastated after the incident and broke down after seeing the carcasses, Bhadarwah SHO Munir Khan said.
As per preliminary investigations, the fire originated from the fire place of the cattle shed around Sunday midnight and spread soon, Khan added.
The locals, along with the sleuths of a team from the Bhalla police post, put out the blaze at around 7 am on Monday.
Two rooms adjoining the cattle shed were also gutted in fire, they said.