Grassland provides multiple ecosystem services and plays a key role in preventing desert encroachment and maintaining oasis stability. In China, the area of cropland in oases has expanded significantly in recent decades, which results in a rapid increase in agricultural water demand and encroachment on grassland subsistence space. However, our knowledge about how the expansion of cropland affects oasis grasslands remains limited. We used machine learning, temporal segmentation of spectral trajectories, and maximum covariance analysis to generate an annual oasis grassland aboveground biomass (AGB) data set at 30‐m resolution from 1989 to 2021 based on multiple remotely sensed and ground observation data sets, and investigated the dynamics of grassland AGB under cropland expansion in oases. We found that overall oasis grassland AGB increased significantly (0.3 gm−2 yr−1, P < 0.01) during 1989–2021, but trends in AGB were not consistent across basins. In the Yellow River, Turpan Hami, Qaidam, and southern Altai Mountains River Basins, AGB was dominated by a significant increase. Conversely, in all basins in southern Xinjiang, AGB showed a decreasing trend due to the rapid cropland expansion. Spatially, cropland expansion and AGB dynamics were strongly coupled. In regions characterized by agricultural concentration, grassland AGB benefitted from resource spillover via edge effects. However, in downstream areas or those with a low proportion of cropland, where most grasslands are distributed, the relationship between the two shifted to a trade‐off. Our study provides a scientific basis for identifying priority areas for ecological restoration and for science‐based planning of the scale of cropland in oases.