The number of breeding pairs of crested ibis (Nipponia nippon) in Hanzhong, China has recovered remarkably from 2 to 511 from 1981 to 2019. Although the crested ibis has been closely monitored, the habitat preference of the bird has not been well studied despite the extensive increase in abundance. We used nest site data from the past 39 years and 30 environmental variables to develop species distribution models for each year. We applied random forest to select important environmental variables, and used logistic regressions to quantify the changes in habitat preferences in 39 years, taking into account the effects of interaction and quadratic terms. We found that six variables had strong impacts on nest site selection. The interaction term of rice paddies and waterbodies, and the quadratic term of precipitation of the wettest quarter of the year were the most important correlates of nest presence. Human impact at nest sites changed from low to high as birds increased their use of ancestral habitats with abundant rice paddies. We concluded that during the population recovery, the crested ibises retained their dependence on wetlands, yet moved from remote areas to populated rural regions where food resources had recovered due to the ban of pesticide use.