During the COVID-19 pandemic in 2020–2021, continuous measurements of CO2 flux were conducted using the eddy covariance method at two representative urban sites in Beijing, China, to assess the temporal and spatial variability of CO2 emissions in urban areas. We further examined the impacts of vegetation and human activities on CO2 emissions. Both sites exhibited characteristics of urban carbon sources in the two years, with higher carbon emissions observed at the Beijing Academy of Landscape and Greening Science (BALGS) site compared to that in the campus of the Research Center of Eco-Environment (RCEES), Chinese Academy of Science. Although the seasonal and diurnal patterns of CO2 flux were similar at both sites, differences in the magnitude of CO2 flux emissions were primarily attributed to variations in underlying surface characteristics within the source area. Seasonal variations and daytime carbon uptake reflected the role of urban vegetation in carbon sequestration. Additionally, our observations revealed that the implementation of COVID-19 control measures effectively reduced urban carbon emissions, with stricter controls associated with lower carbon emissions. Furthermore, we compared the differences in carbon emission reductions between anthropogenic controls and seasonal variations at the two sites. We found that at the densely trafficked BALGS site, the impact of control measures on carbon emission reductions was more pronounced, while at the RCEES site, seasonal variations contributed more to carbon uptake compared to control measures.