Ben Affleck asked documentary makers to censor their discovery that one of his ancestors was a slave-owner, according to emails published by Wikileaks.

The star, 42, of upcoming movie Batman v Superman: Dawn of Justice requested that the producers of the family history show Finding Your Roots leave out details about his heritage.

Affleck's request was revealed in leaked emails between the Emmy Award-winning host and Harvard professor Henry Louis Gates Jr Gates and Sony chief executive Michael Lynton.

Although Affleck is not named in the email exchange, he is referred to as Batman and a "megastar".

Professor Gates wrote: "For the first time one of our guests has asked us to edit out something about one of his ancestors – the fact that he owned slaves.

Favour for Batman

"Now, four or five of our guests this season descend from slave owners. We've never had anyone ever try to censor or edit what we found. He's a megastar. What do we do?"

The professor said that he believed the actor was receiving bad advice and editing out the footage would be a "violation of PBS rules, actually, even for Batman".

Lynton responds saying "all things being equal I would definitely take it out" but warns that if such a move becomes public then "it gets tricky".

Another email exchange apparently from Gates explained that finding slave-owning ancestors was very common in the series and noted Ken Burns and Anderson Cooper as two guests with slave-owner relatives.

The episode was eventually broadcast in September 2014, but the details of his slave-owning relative were omitted, the Daily Mail confirmed.

Wikileaked emails

The potentially damaging emails were published by WikiLeaks, which uploaded up to 30,000 such messages involving Sony last summer, the Daily Mail reported.

The 2014 cyber attack was blamed on affiliates from North Korea, however, it is not known how the new messages were acquired by WikiLeaks.

In a statement responding to the hacked emails Friday, Gates defended their decision to edit out that chapter of Affleck's lineage, arguing that it wasn't "interesting" enough.

"We focused on what we felt were the most interesting aspects of his ancestry — including a Revolutionary War ancestor, a 3rd great-grandfather who was an occult enthusiast, and his mother who marched for Civil Rights during the Freedom Summer of 1964," he stated in part.

"We are very grateful to all of our guests for allowing us into their personal lives and have told hundreds of stories in this series including many about slave ancestors-never shying away from chapters of a family's past that might be unpleasant."

PBS further stated that Gates made an "independent editorial judgment" when choosing what would go into the episode. It's a decision they stand by.

WikiLeaks editor-in-chief Julian Assange justified publishing the emails because it showed the huge influence large media corporations have, the Independent reported.