Dry reforming of methane to prepare synthesis gas is an innovative and practical solution to the current energy crisis as well as environmental issues such as the greenhouse effect. However, the traditional thermocatalytic methane reforming process has limitations, such as high energy consumption and harsh reaction conditions. Here, a novel strategy for the conversion of CO2 and CH4 is reported: the fast and efficient preparation of CO and H2 using solar energy at ambient temperature. In this work, the covalent organic framework (COF) composite is prepared with the hydrothermal method, and its physicochemical properties are studied using different characterization methods. Then, CdS@COF (CCF) is creatively used in the photocatalytic system of CO2-CH4, and the interaction law between the coupling of different mass fractions of COF and CdS and the performance of photocatalytic CH4 reforming is explored. Notably, the CdS@COF (5/5) catalyst shows the best performance in the photocatalytic conversion of CO2 and CH4, with CO and H2 yields of 640μ mol g−1 and 113.24μ mol g−1, respectively. Additionally, the structure–activity relationship between CdS@COF and the photocatalytic conversion of CO2 and CH4 is studied by density functional theory calculation (DFT), including the demonstration of Z-shaped heterojunctions, the adsorption and activation of CO2 and CH4, and the state density of the composites. Finally, based on isotopic tracer experiments, a possible mechanism for CdS@COF photocatalytic reforming of CH4 is proposed. This work provides new research ideas for designing organic semiconductor composites and achieving carbon neutrality.