Yuxi, located in China’s central plateau of Yunnan, is grappling with ecological and environmental challenges as it continues to develop its economy. While ecological quality assessment serves as the foundation for ecological protection, it is pivotal to have reliable and long-term methods for assessing the ecological status to support informed decision-making in ecological protection. Reliable and long-term methods for assessing ecological status in order to facilitate informed decision-making in ecological protection are applied. This study utilized Landsat data to reconstruct four indices (greenness, wetness, dryness, and heat) during the vegetation growth in Yuxi from 2000 to 2020 that employs Harmonic Analysis of Time Series (HANTS) method. Subsequently, the annual Remote Sensing Ecological Index (RSEI) was computed by using the reconstructed indices to evaluate ecological quality in Yuxi. Additionally, spatiotemporal patterns and determinants of Yuxi’s ecological quality are unveiled through Sen’s slope estimator and Mann–Kendall test (Sen + MK) trend analysis, spatial auto-correlation analysis, and geographical detectors applied to year-by-year RSEI data. The findings in the paper indicate that the accuracy of the RSEI is significantly influenced by the vegetation season, suggesting that constructing the RSEI model with data from the vegetation growth season is crucial. Moreover, the HANTS optimization method effectively enhances the ecological indices used in the RSEI model, leading to smoother and more continuous filling of missing data. The difference between the reconstructed RSEI and the original RSEI falls within the range of − 0.15 to 0.15. Yuxi has an average RSEI of 0.54 to emphasis a moderate level of comprehensive ecological quality. Compared with river valley plains, the ecological quality of mountainous areas is higher, and the ecological quality of Yuxi presents a distinct center-edge pattern. From 2000 to 2020, Yuxi’s ecological quality exhibited fluctuations, with a slight overall improvement. Land use patterns, particularly in forestry land and impervious surfaces, are identified as the main drivers of these changes. The research offers valuable insights for scientific decision-making related to sustainable development and ecological protection.