Environmental pollution has led to many ecological issues, including air, water, and soil contamination. Developing appropriate pollution control measures to mitigate these hazards and protect our environment is critical. In that respect, we developed a mathematical model to study the evolution of ecosystems containing food chains under environmental pollution. We integrate environmental pollution into a three-species food chain model, which includes a prey population, an intermediate predator population, and an apex predator population. The equilibrium points of the model are obtained and we analyze their stability. Numerical simulations are carried out to explore the dynamics of the model. The simulation results show that the model presents complex, chaotic, dynamic behaviors. Our study demonstrates that the interactions of individual populations in the food chain and the effects of environmental pollution can result in complex dynamics. The investigation provides insights into the evolution of the food chain in a polluted environment. Our research shows that pollution can disturb the equilibrium in nature, leading to complex and chaotic effects. Reducing environmental pollution can restore the food chain to an orderly state. Environmental pollution will harm the healthy development of each species in the ecosystem. Reducing pollution and restoring each species’ habitats are effective strategies for restoring a healthy ecosystem. Natural ecosystems are often polluted by domestic and industrial sources. The environmental protection department should allocate more resources to address domestic pollution and enhance domestic wastewater treatment methods. Industrial pollution can be reduced by encouraging companies to invest in treating wastewater and waste gases. It is also vital to prevent the establishment of highly polluting industries in environmentally sensitive environments.