I have an organic garden, and use diatomaceous earth to discourage slugs from eating my plants. Lately I have worried that the diatomaceous earth might hurt the earthworms in my soil. Does diatomaceous earth have any detrimental effect on earthworms?
It appears that earthworms will not be harmed by it. "Diatomaceous Earth will not harm warm-blooded animals or earthworms Earthworm farmers use it to treat their worm beds for parasites, fungus gnat larva etc. Earth worms are structurally different from insects in that they can actually digest particles of DE. The particles are then eliminated in their castings."
I'd add that the diatomaceous earth must be food grade for use in areas where there are worms - I couldn't find out why, except that pool grade diatomaceous earth will kill them.
DE harms insects because it gets between pieces of their carapace and cuts them up and dries them out.
Worms are not insects and although a pile of dry DE might be rather excruciating to them, it won't harm them in the soil.