This paper presents an application of a choice experiment measuring public preferences for a farmland retirement project (FRP) in the Gansu environmental degraded region of China. The project helps improve China's long-term food security, and information on public preferences can be used to cost-effectively design such policies. FRP is conceptualized with four attributes relating to public preferences: Areas enrolled in the program, duration of the contract, priority zone for conservation, and vegetation type for planting. The analysis employs a mixed logit model, allowing for preference heterogeneity, and explores the differences between the willingness to pay of urban and rural residents. Results identify substantial benefits for FRP, and these benefits are closely linked to the program design. Results also show that the willingness to pay for a longer period of the program of urban residents is significantly higher than that of rural residents. Finally, this study proposes policy recommendations that the number of areas and years of the current FRP in the study area can be increased moderately, but not excessively, to further benefit local residents.