For the purpose of selective CO2 capture and efficient methanol adsorption, versatile porous carbon adsorbents are prepared from waste cornstalk by using hydrothermal carbonization treatment and the subsequent KOH activation process. The resultant adsorbents are characterized with different techniques, and the effects of activation degree on the porous structure and chemical components are discussed. The influence of porous texture and heteroatoms doping on the performance of CO2 capture and methanol adsorption has been systematically analyzed. For CO2 capture, the ultra-micropore is the dominant factor under 1 bar, while the heteroatoms N and O have important cooperation effect under 0.15 bar. The methanol adsorption uptakes under 95 mbar and 10 mbar are closely associated with the specific surface area and ultra-micropore volume, respectively. The adsorbents exhibit remarkable CO2 adsorption uptake of 3.97 mmol g−1 at 1 bar, and desirable methanol adsorption uptake of 18.88 mmol g−1 at 95 mbar, in the temperature of 25 °C. The adsorbents also feature excellent reusability and good selectivity for CO2 over N2, as well as methanol over water. This work provides a feasible approach to prepare low-cost porous carbon adsorbents, which may inspire new research interests and provide necessary theoretical guidance for the application and investigation of biomass-derived carbonaceous adsorbents for CO2 capture and methanol adsorption.