As a means of producing the resources required for human survival and development, land is the cornerstone of social development and an important part of the ecological environmental system. To measure the granularity and spatial differentiation of changes in the ecological security levels of the study area, this paper uses the PSR model. A kilometer grid is used as the evaluation unit, and a relative entropy theory is used to obtain the combined weight. The comprehensive index method is used to calculate the ecological security value of the land. Based on clarifying the dynamics of time and space, the spatial distribution of the ecological security levels in 2020 is simulated by the CA-Markov model. The results show the following: (1) the level of ecological security in the city of Deyang decreases from 0.580 in 2005 to 0.558 in 2015, showing a fluctuating downward trend, and different districts, cities, and counties and show varying trends. (2) During the study period, the area classified with a safe level decreased from 2853.72km2 in 2005 to 1809.45km2 in 2015, and the areas with critical safe, less safe, and unsafe levels all increased. The areas of decrease are mainly concentrated in the Jingyang District, Luojiang County, and Zhongjiang County. (3) The results of four proposed scenarios for future economic or environmental development are significantly different. Maintaining the status quo cannot change the declining trend in ecological security in the city of Deyang. A priority of economic development will lead to a significant decline in land ecological security. Establishing environmental protection as a priority can significantly change the ecological security of the land in the city. The results of the "comprehensive" scenario simulation are closest to the actual security values calculated for 2019, reflecting the trade-off between economic development and environmental protection. The research results can provide a reference for the evaluation and prediction of ecological security and provide theoretical guidance for the formulation of sustainable measures.