Insufficient attention has been given to the recycling of excess urea despite its potential detrimental effects on soil nutrient equilibrium, geological structure, and crop health. In this study, corncob-derived porous biochar (CPB), which is rich in surface functional groups, was prepared from biomass corncob in two steps as an adsorbent to remove urea from wastewater. Compared with the typical carbonization and activation processes, this process resulted in a higher yield of CPB and an ultrahigh adsorption capacity for urea. Response surface analysis was utilized to determine the optimal carbonization conditions, which were found to be 500 °C for 6 h with a heating rate of 15 °C/min. The exceptional adsorption capability of CPB can be ascribed to its porous structure and significant presence of oxygen-containing functional groups, which facilitate a synergistic interaction of physisorption and chemisorption. This adsorption phenomenon aligns with the Harkins–Jura isotherm model and adheres to pseudo-second order kinetics. CPB demonstrates potential as an adsorbent for the elimination of urea from wastewater in an economical and effective fashion.