Earthworms modulate the carbon and nitrogen cycling in terrestrial ecosystems, their effect may be affected by deposited compounds due to human activity such as industrial emissions. However, studies investigating how deposited compounds affect the role of earthworms in carbon cycling such as litter decomposition are lacking, although they are important for understanding the influence of deposited compounds on ecosystems and the bioremediation by applying earthworms. For this, we performed a 365-day in situ litterbag decomposition experiment in a deciduous (Quercus variabilis) and coniferous (Pinus massoniana) forest in southeast China. We manipulated nitrogen (N), sodium (Na) and polycyclic aromatic hydrocarbon (PAH) deposited compounds during litter decomposition with and without earthworms (Eisenia fetida). After one year, N, Na and PAH compounds all slowed down litter mass loss, with the effects of Na being the strongest. By contrast, E. fetida generally increased litter mass loss and their positive effects were uniformly maintained irrespective of the type of deposited compounds. Further, the pathways earthworms increasing litter mass loss varied among the types of deposited compounds and forests. As indicated by structural equation modeling, earthworms maintained their positive effects and mitigated the negative effects of deposited compounds by directly increasing litter mass loss and indirectly increasing soil pH and microbial biomass. Overall, the results indicate that the acceleration of earthworms on litter mass loss is not affected by deposited compounds, with the pathways of earthworms increasing litter mass loss varying among the types of deposited compounds and forests. This suggests that the effects of atmospheric deposited compounds and earthworms on terrestrial ecosystem processes need to be taken into account because earthworms may cancel out the detrimental influence of deposited compounds on litter decomposition.