Despite advances in remote sensing–based gross primary productivity (GPP) modeling, the calibration of the Moderate Resolution Imaging Spectroradiometer (MODIS) GPP product (GPPMOD) is less well understood over rice–wheat-rotation cropland. To improve the performance of GPPMOD, a random forest (RF) machine learning model was constructed and employed over the rice–wheat double-cropping fields of eastern China. The RF-derived GPP (GPPRF) agreed well with the eddy covariance (EC)-derived GPP (GPPEC), with a coefficient of determination of 0.99 and a root-mean-square error of 0.42 g C m−2 d−1. Therefore, it was deemed reliable to upscale GPPEC to regional scales through the RF model. The upscaled cumulative seasonal GPPRF was higher for rice (924 g C m−2) than that for wheat (532 g C m−2). By comparing GPPMOD and GPPEC, we found that GPPMOD performed well during the crop rotation periods but underestimated GPP during the rice/wheat active growth seasons. Furthermore, GPPMOD was calibrated by GPPRF, and the error range of GPP MOD (GPPRF minus GPPMOD) was found to be 2.5–3.25 g C m−2 d−1 for rice and 0.75–1.25 g C m−2 d−1 for wheat. Our findings suggest that RF-based GPP products have the potential to be applied in accurately evaluating MODIS-based agroecosystem carbon cycles at regional or even global scales.