The invention belongs to the field of environmental protection equipment, and relates to an environment-friendly toilet technology, in particular to an ecosystem applied to septic tank sewage treatment. The ecosystem comprises a multi-stage septic apparatus, the multi-stage septic tank is provided with a liquid discharge pipe, the liquid discharge pipe communicates with a sewage collection tank, awater outlet end of the sewage collection tank is provided with water seepage pipes, the water seepage pipes are provided with seepage holes, the water seepage pipes are pre-buried in the ground, a planting area is arranged on the ground surface, the planting area is divided into a plurality of sections from one side, close to the sewage collection tank, of the water seepage pipes to one side, away from the sewage collection tank, of the water seepage pipes, corresponding plants are sequentially planted in the corresponding areas according to the ability of absorbing nitrogen element in the soil from strong to weak, a water filtering apparatus is arranged at the underground position below the planting area along the horizontal direction, a slope is formed by excavating in the ground located below the water filtering apparatus, the low position of the slope communicates with a water inlet end of a sedimentation tank, and a water outlet end of the sedimentation tank communicates with aclarification tank.