Geoffrey Towell, 54, of East Harling, Norfolk, was jailed for 18 weeks and disqualified from working in animal farming for 10 years.
James Dove, 27 of Wymondham, Norfolk, received an eight-week jail term, suspended for a year, at Norwich Magistrates' Court.
District Judge Peter Veits said it was among the worst cases of deliberate cruelty he had seen.
Jonathan Eales, prosecuting, said the most serious charges related to Towell killing three pigs by hitting them on the head with a metal bar. He also used unnecessary force to lift piglets and pulled them, twisted them and threw them to the ground and picked up pigs by their ears.
The court heard Dove, a tractor driver, was "drawn in" to helping Towell with the farm's 300 pigs at a time of "systematic difficulties" at the farm. He was recorded kicking the animals and seen throwing two of them over a barrier.
Dove lifted pigs with "excessive force" and by their ears and legs before dropping them to the ground. Both men struck pigs with a plastic pipe.
Towell, of Eccles Road, admitted five charges and Dove, of Arundel Road, two charges of causing unnecessary suffering. They also failed to protect pigs from suffering contrary to the Animal Welfare Act. This amounted to one charge for Towell and two for Dove.
Ian Fisher, for Dove, said: "Some of the things he was doing were impulsive, instinctive or copied." He added: "The public shame brings with it it's own form of punishment."
Days after the Animal Equality investigation came to light, farm owner Stephen Brown, 52, was found dead with a shotgun blast injury to the head. A coroner ruled he had taken his own life.
Referring to this, Jamieson Plummer, for Towell, said: "He's had to carry the burden of the owner dying, and that's played on him and he's been depressed." He asked Judge Veits not to consider a banning order, as this would lose Towell his job and home, attached to the farm.
Sentencing the men, Judge Veits said: "These are awful crimes. "It's easier to blame those who are no longer here to answer any charges. Mr Towell, you behaved in a manner that showed no empathy or care for pigs in your control. You repeatedly beat pigs and killed other pigs."
He said Dove had played a "lesser role" but had showed no empathy to the pigs as living beings. Dove was told to complete 180 hours of unpaid work.
Both men were banned from working in animal farming - Towell for 10 years and Dove for five.
HELP US TO CONTINUE DEFENDING ANIMALS BY A REGULAR MONTHLY DONATION: click here!
Watch the undercover footage taken at Harling Farm:
Photo Gallery of the investigation:
We are pleased that the people responsible for the harrowing scenes we documented on this farm have been brought before the courts and sentenced for the suffering they inflicted on pigs.
Although laws are clearly insufficient to protect animals, we consider it is important to use the little protection animals have to generate a debate on their exploitation.
Society must understand that hurting animals is not only wrong but also a very serious issue. We must all take part in ending violence towards animals by not demanding animal products.
Learn more about a life based on respect and kindness: click here.