The invention provides a method for preparing a bean dregs-based nitrogen-boron co-doped porous carbon material, which is characterized in that the method is a one-step dipping and carbonization activation method, comprising the following steps: (1) pretreating the bean dregs: boiling, fermenting , Add catalyst to the fermented bean dregs to catalyze, freeze-dry after washing; (2) add deionized water to the pretreated bean dregs, add activator and boron source to stir and mix, transfer to a petri dish, put into a drying box (3) heat-treat the bean dregs processed in step (2), soak them in HCl solution after cooling down, wash them, and finally obtain the processed bean dregs through microwave drying; (4) process the bean dregs after step (3) A binder and a pore-forming agent are added to the bean dregs, and the bean dregs-based porous carbon material is formed after mixing. The invention adopts a one-step dipping and carbonization activation method. Compared with the prior art, the one-step dipping and carbonization activation method has the advantages of simple method, low energy consumption and the like.