Earthworms are hermaphrodites, which means they have both male and female reproductive organs. However, it is difficult to distinguish the sexes visually, as the external anatomy of male and female earthworms is similar. To identify the sex of an earthworm, you need to examine its internal reproductive organs under a microscope.