Infected bone defects show a significant reduction in neovascularization during the healing process, primarily due to persistent bacterial infection and immune microenvironmental disorders. Existing treatments are difficult to simultaneously meet the requirements of antibacterial and anti-inflammatory treatments for infected bone defects, which is a key clinical therapeutic challenge that needs to be addressed. In this study, a conductive hydrogel based on copper nanoparticles was developed for controlling bacterial infection and remodeling the immune microenvironment. The hydrogel not only effectively eliminates bacteria that exist in the infected bone defect region but also transmits electrical signals to restore the disordered immune microenvironment. In vitro studies have shown that the hydrogel has excellent biocompatibility and can modulate macrophage polarization by transmitting electrical signals to reduce inflammation and promote neovascularization. In vivo studies further confirmed that the hydrogel scaffold not only rapidly cleared clinical bacterial infections but also significantly induced the formation of vascularized new bone tissue within 4 weeks. This work provides a simple and innovative strategy to fabricate copper-containing conductive hydrogels that show great potential for application in the field of therapeutics for infected bone regeneration.