Porous carbon has shown excellent performance in CO2 adsorption which is one of the important methods for CO2 capture and storage. It is important to achieve the goal of "peak carbon dioxide emissions" and "carbon neutrality". Taking three typical traditional Chinese medicine solid wastes that isatis root residue, licorice residue and Caulis Spatholobi residue as examples, the preparation of porous carbon from traditional Chinese medicine solid waste by nitrogen doped hydrothermal carbonization chemical activation two-step method was explored, as well as its CO2 adsorption performance. Hydrothermal method eliminates the pre drying of traditional Chinese medicine solid waste and adapts to the characteristics of high moisture content of traditional Chinese medicine solid waste. KOH was used as activator in chemical activation method, and it was activated under high temperature environment (experimental temperature is 600, 700 and 800 ℃). Urea was used as surface modifier in the preparation process, and N was doped on the surface of porous carbon to improve the adsorption performance. In order to explore whether N is doped on the surface of porous carbon, hydrothermal carbon and porous carbon were tested by elemental analysis and XPS. The results show that N has been successfully doped on the surface of porous carbon. Through the analysis of the experimental results, nitrogen doped porous carbon shows richer pore structure and better adsorption performance under the same preparation conditions, which means that nitrogen-containing functional groups have a positive effect on the adsorption performance of porous carbon. In order to compare the adsorption properties of porous carbon prepared at different activation temperatures, its CO2 adsorption capacity was studied. Langmuir and Freundlich models were used to fit the CO2 adsorption isotherm. The results show that compared with 700 and 800 ℃, the porous carbon activated at 600 ℃ has better CO2 adsorption performance due to the loss of N caused by high temperature activation, which has an adverse effect on the adsorption performance. In general, the porous carbon obtained has rich pore structure, and the specific surface areas of the porous carbon prepared from the three raw materials are 2 516,2 518 and 1 996 m2/g, respectively. At the activation temperature of 600 ℃, the porous carbon prepared from the three raw materials shows good CO2 adsorption capacity, which are 6.70, 6.52 and 6.43 mmol/g, respectively. It means that the effect of hydrothermal simultaneous nitrogen doping and chemical activation on the CO2 adsorption capacity of the prepared porous carbon can be reduced, but the raw materials still have a great impact on the CO2/N2 selectivity.