Earthworms play a key role in improving soil health, and their diversity and density are mainly affected by soil and climatic factors. This study determined the effects of rainfall, temperature and selected soil properties on the diversity and density of earthworms in Raymond Mhlaba municipality of the Eastern Cape, South Africa. Nine sites in the municipality covering the humid, sub-humid, semi-arid and arid regions were sampled. At each site, earthworms were collected for identification and quantification. The relationships between earthworm density and diversity against the selected factors were analysed using analysis of variance and Pearson correlations. Seven exotic earthworm species were identified, namely: Dendrobaena octaedra; (epigeic groups); Aporrectodea caliginosa; Pontoscolex corethrurus (Rhinodrillidae); Allolobophora chlorotica (endogeic groups); Amynthas aspergillum, Lumbricus terrestris and Fimoscolex sporadochaetus (anecic groups). No indigenous earthworms were found. There were significant differences in earthworm density and biomass across all the climatic zones (p < 0.05). Earthworm density and biomass showed positive correlations with soil moisture and rainfall but strong negative correlations with temperature (p < 0.05). Earthworm densities across all sites were lower than the global average. The study concluded that sub-humid environments exhibited the highest earthworm diversity and density while rainfall, temperature and soil moisture influenced earthworm distribution, diversity and density.