Shifting microglia/macrophages to M2 anti-inflammatory phenotype is considered a pivotal therapeutic target for spinal cord injury (SCI). Keratin extracted from human hair exhibits anti-inflammatory properties. However, the differences among the 17 types of human hair keratins and their mechanisms of anti-inflammation remain poorly understood. In this study, the anti-inflammatory activity of 17 human hair keratins using a recombinant synthesis approach is explored. Distinct activities of microglia/macrophage phenotype modulation of 17 keratins are found through qRT-PCR analysis, and recombinant keratin 33A (RK33A) and RK35 display superior anti-inflammatory efficiency compared to other keratins. Immunofluorescence and flow cytometry reveals a significant effect of RK33A on the regulation of microglia/macrophages into an anti-inflammatory M2 phenotype. Subsequently, recombinant keratin 33A nanofiber (RKNF33A) is fabricated to evaluate its in vivo anti-inflammatory and nerve regeneration properties using the rat T9 spinal cord lateral hemisection model. The optimized keratin-based nanofiber shows outstanding performance in enhancing M2 polarization, reducing glial scarring, promoting nerve regeneration, and improving locomotor function recovery in SCI rats. Moreover, it is preliminarily found that RK33A regulates M2 microglia/macrophage polarization by upregulating the PI3K/AKT/mTOR signaling pathway. Together, this study reveals that trichocytic keratins exhibit distinct anti-inflammatory properties, providing a prospective treatment for SCI by modulating microglia/macrophage polarization.