Herein, a lignocellulose-degrading fungus (Irpex lacteus) was used to solidly ferment wheat straw to enhance its performance by improving its native structure and introducing an additional nitrogen source. Subsequently, the fungal-mediated wheat straw porous carbon (IL-WSPC-700) was prepared by the NaOH-activated etching method. The results of the characterization confirmed that the fungal treatment could successfully disrupt the natural structure of the wheat straw, resulting in better etching during the subsequent alkali activation process. The IL-WSPC-700 exhibited a larger specific surface area (3452.42 m2 g−1) with more micropores, which positively impacted the adsorption of heavy metal Chromium (Cr, the oxidation number was 6) by the material, and the highest adsorption capacity (678.41 mg g−1) was observed at pH value = 1. In addition, the electrode prepared by IL-WSPC-700 had a high specific capacitance of 310.7 F g−1 at 1 A g−1 current density and maintained 95.83 % of the specific capacitance after 5000 cycles in the two-electrode system. The above experiments confirmed the success of the fungal treatment strategy, IL-WSPC-700 had excellent adsorption and electrochemical performances. This study is an attempt to design and prepare adsorbents and electrode materials using microbial hypha and agricultural wastes. It could provide a reference for the preparation of high-performance materials via the synergistic effect of microbial assistance and alkali etching.