Large-scale ecological restoration efforts of the degraded desert steppe ecosystem in northwestern China have effectively combated desertification but have also resulted in the encroachment of shrubs. However, the function of the anthropogenic shrub ecosystem is still unknown under climate change, especially the response of carbon fluxes to drought, which hinders our further understanding of its sustainability in the future. Hence, based on the eddy covariance and environment sensors, continuous carbon and water fluxes and biophysical factors were monitored during 2019–2022 to investigate the characteristics of carbon fluxes and their response to seasonal drought in an anthropogenic shrub ecosystem dominated by Caragana liouana in the southern Mu Us sandy land, northwestern China. The results showed the shrub ecosystem was a stable carbon sink over the 4 years despite large interannual variability, with annual net ecosystem production (NEP) ranging from 54.37 to 150.35 g C·m−2·y−1. Interannual variability in NEP was mainly due to variation in gross primary productivity (GPP), which is driven by the fact that interannual variability in GPP was higher than interannual variability in ecosystem respiration (Reco). While drought inhibited GPP more than Reco, thus weakening the carbon sequestration ability of the ecosystem during the middle growing season, and thereby carbon fluxes in the shrub ecosystem were significantly suppressed by drought in the middle growing season but slightly in the early growing season. Furthermore, the magnitude and variation of carbon fluxes were determined by the maximum apparent photosynthetic capacity of the canopy (Pmax), leaf area index (LAI), and canopy conductance (gc), all of which are limited by water stress during drought. The work suggests that to keep the carbon sink of anthropogenic shrub ecosystems in arid and semi-arid areas, managers should focus on drought-relief measures in the middle growing season that are better adapted to future climate change.