It sounds like an urban myth - figs contain the bodies of dead wasps. But in this case, the story is completely true.
Figs and wasps have a strange, mutualistic relationship: Figs rely on wasps to pollinate the flowers that are inside the fruit, and fig wasps need a safe place to lay their eggs. So, fig wasps end up burrowing inside fig fruits to lay their eggs. This process causes the wasps to loose their wings and antennae, which means the female wasps die inside the figs.
Once they're mature, the wasp eggs hatch and male offspring mate with female offspring. Wingless males also fulfill their duties by burrowing tunnels for the female wasps - now pregnant and loaded with pollen - to exit and begin the cycle anew.
So why don't we find wasps in our figs more often? Well, some domesticated varieties of the common figs are seedless and don't require pollination. Others varieties are separated into male and female trees, of which wasps only pollinate the male trees. Even if wasps do end up in the fruit, fruit enzymes easily digest the insect bodies. This means the fig and the wasp eventually become one and the same. Tasty!