The current study focuses on applying machine learning approaches to forecast future Kharif rice yield gaps in eastern India while accounting for climate change implications. To achieve the United Nations Sustainable Development Goals (SDGs), food security must be prioritized. Rice yield has been predicted using Cubist, GBM, MARS, RF, SVM, and XGB machine learning methods, considering six factors: elevation, soil moisture, precipitation, temperature, soil temperature, and actual evapotranspiration. Climatic change scenarios were generated using the latest climatic Coupled Model Intercomparison Project Phase 6 (CMIP6 MIROC6) Shared Socioeconomic Pathways (SSP) 2–4.5 and SSP5-8.5 datasets between 1990 and 2030. Finally, machine learning algorithms were used to identify rice yield gaps to achieve sustainable agricultural intensification. The rice yield validation was completed with 1889 field-based farmer observation records. The results suggest that Murshidabad and Purba Bardhaman districts had very high rice yields (5.60–3.45 t/ha) when using the Cubist model compared to another model. The findings also reveal a poor rice-yielding zone (1.44–0.39 t/ha) in the western region (Purulia) and a northwestern region (half of the west of Birbhum). The Cubist and RF models' maximum and minimum R2 values were 0.73 and 0.72, respectively. The R2 values were also negligible for the XGB, GBM, SVM, and MARS, machine learning models. Projections for rice production in 2030 indicate that the northern and north-eastern regions (Murshidabad and Purba Bardhaman) as well as the southeastern areas (Jhargram and Paschim Medinipur) have the highest yields, categorized as extremely very high (5.56–3.49 t/ha) and high (3.49–2.49 t/ha). A significant rice yield gap (50-40 %) was found in the center and south-east areas (Bankura, Jhargram, and Paschim Medinipur), the northern region (Murshidabad and Birbhum), and the western region (Purulia). In 2030, the north-western region (Birbhum), as well as the middle and south-eastern regions (Bankura, Jhargram, and Paschim Medinipur districts), had the highest proportion of high (50%–40 %) and very high (60%–50 %) rice yield gap. Our findings can contribute to a new viewpoint on agricultural planning and management for sustainable growth in the face of changing climate circumstances.