These prehistoric sharks used protected coastal lagoons to rear their babies, but it seems they also resorted to cannibalising them when other food sources became scarce.
Three hundred million years ago, Europe and North America lay on the equator and were covered by jungles (the remains of which are now compacted into coal seams).
The top predators of these so-called "Coal Forests" were not land animals, but huge sharks that hunted in the oily waters of coastal swamps.
The poop is known to have been excreted by Orthacanthus because this shark had a special corkscrew rectum that makes identification easy.
More From This Section
The poop is packed full of the teeth of juvenile Orthacanthus, confirming that these sharks fed on their own babies. This is called "fillial cannibalism".
"Orthacanthus was a three-metre-long xenacanth shark with a dorsal spine, an eel-like body, and tricusped teeth," said Aodhan O Gogain, PhD candidate at the Trinity College Dublin in Ireland.
"There is already evidence from fossilised stomach contents that ancient sharks like Orthacanthus preyed on amphibians and other fish, but this is the first evidence that these sharks also ate the young of their own species," said Gogain.
"One method is by probing the contents of coprolites (fossil poop) as we have done here," Benton said.
"We don't know why Orthacanthus resorted to eating its own young. However, the Carboniferous Period was a time when marine fishes were starting to colonise freshwater swamps in large numbers," said Howard Falcon-Lang, from Royal Holloway University of London.
"It's possible that Orthacanthus used inland waterways as protected nurseries to rear its babies, but then consumed them as food when other resources became scarce," Falcon-Lang said.
"This unusual ecological adaptation may have played an important role in the colonisation of inland freshwater environments," he said.
The findings were published in the journal Palaeontology.