Microstructural engineering has been an effective way to modulate the performance of electromagnetic wave absorption (EMA) materials. However, there are still severe challenges in how to design and regulate the microstructure effectively and further elucidate its mechanisms. Here, three-dimensional (3D) bio-derived N-doped carbon fibers anchored by CoNi nanoparticles (N-Cf@CoNi) nanocomposites were successfully prepared using biomass cotton and ZIF-67 precursor as raw materials by a two-step impregnation-carbonization method. By ingeniously adjusting the mass ratio of the ZIF-67 precursor, the surface morphology of balsam pear-like fiber was induced by crystal surface energy to achieve a transition from a “nanotube-assembled nest-like” structures to “rice-shaped nanosheets” to “nanoparticles.” The unique microstructural engineering strategy endows the N-Cf@CoNi nanocomposites with an abundant conductive network, enhanced multiple reflection and absorption, polarization, and magnetic loss, thereby leading to distinguished EMA performance, especially ultrawide EAB values. The optimized N-Cf@CoNi nanocomposites display a minimum reflection loss (RLmin) of − 59.43dB and an effective absorption bandwidth (EAB) of 8.5 GHz at a matching thickness of 2.16 mm. The result underscores the potential of microstructural engineering induced by crystal surface energy in optimizing the microwave absorption of N-Cf@CoNi nanocomposites, laying the foundation for the development of efficient EMA materials with controllable micro-morphology.