The pollution of chemical elements to farmland soils and agricultural production has become one of the hot issues in the existing study of soil chemistry and agricultural environmental pollution. It is of great practical significance to strengthen the study of chemical elements on farmland soil pollution for promoting the safe and healthy development of agricultural production. To this end, this paper adopts the overlay and index method to evaluate the influence of chemical elements on the soil environment of the farmland by taking the nitrogen as an example. The results show that nitrogen exists in different soil layers in various forms, e.g., for the nitrate nitrogen, its content in the soil gradually increased with time, and that in the lower root zone was the highest, at the highest growth rate; that of the intermediate unsaturated zone was the lowest. The pollution of chemical elements on farmland soil is divided into natural factors and human factors. The overlay and index method-based index system was established to obtain the comprehensive index of chemical elements on soil environmental pollution of ecological farmland. The research results can provide theoretical reference and scientific basis for pollution prevention and control of farmland.