Protein self-assembly allows for the formation of diverse supramolecular materials from relatively simple building blocks. In this study, a single-component self-assembling hydrogel is developed using the recombinant protein CsgA, and its successful application for spinal cord injury repair is demonstrated. Gelation is achieved by the physical entanglement of CsgA nanofibrils, resulting in a self-supporting hydrogel at low concentrations (≥5 mg mL