Cavernous nerve injury (CNI), resulting in erectile dysfunction (ED), poses a significant threat to the quality of life for men. Strategies utilizing conductive hydrogels have demonstrated promising results for the treatment of peripheral nerves with a large diameter (> 2 mm). However, integrating convenient minimally invasive operation, anti-swelling and immunomodulatory conductive hydrogels for treating small-diameter injured cavernous nerves remains a great challenge. Here, we developed a sprayable adhesive conductive hydrogel (GACM) composed of gelatin, adenine, carbon nanotubes, and mesaconate designed for cavernous nerve repair. Multiple hydrogen bonds provided GACM with excellent adhesive and antiswelling properties, enabling it to establish a conformal electrical bridge with the damaged nerve and aiding in the regeneration process. Additionally, mesaconate-loaded GACM suppressed the release of inflammatory factors by macrophages and promoted the migration and proliferation of Schwann cells. In vivo tests demonstrated that the GACM hydrogel repaired the cavernous nerve and restored erectile function and fertility. Furthermore, we validated the feasibility of sprayable GACM in minimally invasive robotic surgery in beagles. Given the benefits of therapeutic effectiveness and clinical convenience, our research suggests a promising future for sprayable GACM materials as advanced solutions for minimally invasive nerve repair. This article is protected by copyright. All rights reserved.This article is protected by copyright. All rights reserved.