Thermophilic composting produces a significant amount of greenhouse gases. The objectives of this study were (i) to evaluate the effectiveness of vermicomposting to reduce nitrogen losses and greenhouse gases emissions compared to thermophilic composting, and (ii) to determine the effect of different variables (i.e. carbon:nitrogen ratio, earthworm density, moisture content and carbon quality) on greenhouse gases emissions and earthworm growth during vermicomposting. The results showed that vermicomposting significantly reduced nitrogen loss by 10–20% compared to thermophilic composting. Vermicomposting decreased nitrous oxide emissions by 25–36% and methane emissions by 22–26%. A higher earthworm density increased carbon dioxide emissions by 3–14%, but decreased methane emissions by 10–35%. Earthworm density had a marginal effect on nitrous oxide emissions. Vermicomposting decreased nitrous oxide emissions by 40% with higher moisture and by 23% with lower moisture. Vermicomposting also decreased methane emissions by 32% and 16% with higher and lower moistures respectively. This study showed that the addition of labile carbon sources increased carbon dioxide and methane emissions and earthworm growth, but did not affect nitrous oxide emissions. In conclusion, vermicomposting is effective at reducing nitrogen losses and greenhouse gas emissions from composting. Therefore, vermicomposting could represent an option for reducing greenhouse gas emissions from composting, particularly in developing countries where the existing technical solutions are expensive and difficult to implement.