The invention relates to lightweight ecological nutrient soil for roof greening and a method for preparing the lightweight ecological nutrient soil. The nutrient soil is made of dry basis raw materials including 10-20% of biogas residues, 5-15% of slag, 10-20% of loess, 25-35% of rice hulls, 15-25% of mushroom residues and 15-30% of pine needle soil, and living earthworms accounting for 0.2-1% of the total mass of the dry basis raw materials. The nutrient soil is light in load, low in volume weight, free from hardening, resistant to trampling, fine in moisture and fertility preserving performance, pollution-free, extensive in source of raw materials, low in cost, simple in production process and easy to popularize.