We developed an algorithm (named GMI_XCO2) to retrieve the global column-averaged dry air mole fraction of atmospheric carbon dioxide (XCO2) for greenhouse-gases monitor instrument (GMI) and directional polarized camera (DPC) on the GF-5 satellite. This algorithm is designed to work in cloudless atmospheric conditions with aerosol optical thickness (AOT)<0.3. To quantify the uncertainty level of the retrieved XCO2 when the aerosols and cirrus clouds occurred in retrieving XCO2 with the GMI short wave infrared (SWIR) data, we analyzed the errors rate caused by the six types of aerosols and cirrus clouds. The results indicated that in AOT range of 0.05 to 0.3 (550 nm), the uncertainties of aerosols could lead to errors of −0.27% to 0.59%, −0.32% to 1.43%, −0.10% to 0.49%, −0.12% to 1.17%, −0.35% to 0.49%, and −0.02% to −0.24% for rural, dust, clean continental, maritime, urban, and soot aerosols, respectively. The retrieval results presented a large error due to cirrus clouds. In the cirrus optical thickness range of 0.05 to 0.8 (500 nm), the most underestimation is up to 26.25% when the surface albedo is 0.05. The most overestimation is 8.1% when the surface albedo is 0.65. The retrieval results of GMI simulation data demonstrated that the accuracy of our algorithm is within 4 ppm (∼1%) using the simultaneous measurement of aerosols and clouds from DPC. Moreover, the speed of our algorithm is faster than full-physics (FP) methods. We verified our algorithm with Greenhouse-gases Observing Satellite (GOSAT) data in Beijing area during 2016. The retrieval errors of most observations are within 4 ppm except for summer. Compared with the results of GOSAT, the correlation coefficient is 0.55 for the whole year data, increasing to 0.62 after excluding the summer data.