Antimicrobial resistance (AMR) has become a global public health threat. One of the major causes of AMR development is the accumulation of low levels of antimicrobials in the environment. To tackle this problem, novel antimicrobial agents that do not leave active residues after treatment are needed. In this study, a strategy for synthesizing a series of main-chain imidazolium oligomers that incorporate carbonate, hemiaminal, ester and urea functional groups to serve as degradable linkers is presented. These oligomers exhibit excellent microbicidal activity and kill E. coli at low concentrations in a short time (99% killing efficiency in 2 min). Moreover, the oligomers are self-degradable and biocompatible. The degradation of these oligomers is studied in buffered solutions with different pH. Under basic conditions (pH = 8), carbonate-linked and ester-linked oligomers degrade to inactive and less toxic small molecules within weeks, making it less likely for these oligomers to induce antimicrobial resistance as compared to traditional antibiotics. The application of these oligomers for the in vivo treatment of S. aureus infected wounds is demonstrated in a mouse model. Notably, the oligomers demonstrate antibacterial efficacy and accelerated wound healing comparable to vancomycin, a first-line antibiotic for the treatment of complicated skin infections.