Farmland abandonment reflects the decline of rural areas, resulting in a series of vicious chain reactions, hindering the promotion of the comprehensive rural revitalization strategy. From the perspective of ecological restoration, this paper integrated multi-source data such as Landsat, GF-1, and Google Earth images and household survey data, aiming to reveal the spatiotemporal pattern, attribution, and mechanism of farmland abandonment in typical mountainous areas over the past 20 years by employing spatial analysis and mathematical models and to promote comprehensive management of abandoned farmland. The results are as follows. (1) The scope of abandoned farmland in Chongqing has been expanding, with the abandoned area growing from 142,385.8 hm2 to 345,778.4 hm2 from 2000 to 2020, with the initially abandoned farmland mostly concentrated in the northeastern areas, such as Chengkou, with an abandonment rate of 21.8%, and thereafter, spreading in all directions; In the end, abandoned farmland was concentrated in northeastern and southeastern Chongqing, such as Wuxi and Youyang, with abandonment rates of approximately 25.1% and 20%, respectively. (2) The attribution of farmland abandonment mainly includes wild boar damage, labour shortage, and natural conditions, among which wild boar proliferation has become an important factor under the background of ecological restoration. (3) Ecological restoration has produced a counter-servicing effect of the ecosystem on human beings, forming a vicious circle in the mountainous countryside where ecological restoration continues to aggravate farmland abandonment. The contribution of this study is to investigate the pattern of farmland abandonment from both macroscopic and microscopic perspectives. At the same time, this paper explores the intrinsic mechanism between ecological restoration and farmland abandonment and proposes scientific countermeasures to break the vicious cycle of ecological restoration that continues to exacerbate farmland abandonment in mountainous areas.