Abstract. Precise and continuous monitoring on long-term carbon dioxide (CO2) and methane (CH4) over the globe is of great importance, which can help study global warming and achieve the goal of carbon neutrality. Nevertheless, the available observations of CO2 and CH4 from satellites are generally sparse, and current fusion methods to reconstruct their long-term values on a global scale are few. To address this problem, we propose a novel spatiotemporally self-supervised fusion method to establish long-term daily seamless XCO2 and XCH4 products from 2010 to 2020 over the globe at grids of 0.25°. A total of three datasets are applied in our study, including GOSAT, OCO-2, and CAMS-EGG4. Attributed to the significant sparsity of data from GOSAT and OCO-2, the spatiotemporal Discrete Cosine Transform is considered for our fusion task. Validation results show that the proposed method achieves a satisfactory accuracy, with the σ (R2) of ~ 1.18 ppm (> 0.9) and 11.3 ppb (0.9) for XCO2 and XCH4 against TCCON measurements, respectively. Overall, the performance of fused results distinctly exceeds that of CAMS-EGG4, which is also superior or close to those of GOSAT and OCO-2. Especially, our fusion method can effectively correct the large biases in CAMS-EGG4 due to the issues from assimilation data, such as the unadjusted anthropogenic emission inventories for COVID-19 lockdowns in 2020. Moreover, the fused results present coincident spatial patterns with GOSAT and OCO-2, which accurately display the long-term and seasonal changes of globally distributed XCO2 and XCH4. The daily global seamless gridded (0.25°) XCO2 and XCH4 from 2010 to 2020 can be freely accessed at http://doi.org/10.5281/zenodo.7388893 (Wang et al., 2022b).