Infectious bacteria evolve fast into resistance to conventional antimicrobial agents, whereas treatments for drug resistance bacteria progress more slowly. Here, we report a universally applicable photoactivated antimicrobial modality through light-responsive carbon dot-embedding soft hyaluronic acid hydrogel (CDgel). Because of the innate nature of the infectious bacteria that produce hyaluronidase, applied hyaluronic acid-based CDgel breaks down via bacteria and releases carbon dots (CDs) into the infectious sites. The released CDs possess photodynamic capabilities under light irradiation, inducing O-1(2) generation and growth inhibition of the infectious bacteria, S. aureus and E. coli (similar to 99% and similar to 97%, respectively), in vitro. In particular, these photodynamic effects of CDs from CDgel have been shown to accelerate the healing of infected wounds in vivo, showing a higher wound regeneration rate as compared to that of untreated wounds. Our work demonstrates that the biocompatible and shape-controllable CDgel possesses therapeutic potential as a treatment modality for the light-driven control of drug-resistant bacterial infections.