The urban ecological environment is related to human health and is one of the most concerned issues nowadays. Hence, it is essential to detect and then evaluate the urban ecological environment. However, the conventional manual detection methods have many limitations, such as the high cost of labor, time, and capital. The aim of this paper is to evaluate the urban ecological environment more conveniently and reasonably, thus this paper proposed an ecological environment evaluation method based on remote sensing and a projection pursuit model. Firstly, a series of criteria for the urban ecological environment in Shanghai City are obtained through remote sensing technology. Then, the ecological environment is comprehensively evaluated using the projection pursuit model. Lastly, the ecological environment changes of Shanghai City are analyzed. The results show that the average remote sensing ecological index of Shanghai in 2020 increased obviously compared with that in 2016. In addition, Jinshan District, Songjiang District, and Qingpu District have higher ecological environment quality, while Hongkou District, Jingan District, and Huangpu District have lower ecological environment quality. In addition, the ecological environment of all districts has a significant positive spatial autocorrelation. These findings suggest that the ecological environment of Shanghai has improved overall in the past five years. In addition, Hongkou District, Jingan District, and Huangpu District should put more effort into improving the ecological environment in future, and the improvement of ecological environment should consider the impact of surrounding districts. Moreover, the proposed weight setting method is more reasonable, and the proposed evaluation method is convenient and practical.