The emergence of antibiotic resistance has brought a significant burden to public health. Here, we designed and synthesized a series of cannabidiol derivatives by biomimicking the structure and function of cationic antibacterial peptides. This is the first report on the design of cannabidiol derivatives as broad-spectrum antibacterial agents. Through the structure-activity relationship (SAR) study, we found a lead compound 23 that killed both Gram-negative and Gram-positive bacteria via a membrane-targeting mechanism of action with low resistance frequencies. Compound 23 also exhibited very weak hemolytic activity, low toxicity toward mammalian cells, and rapid bactericidal properties. To further validate the membrane action mechanism of compound 23, we performed transcriptomic analysis using RNA-seq, which revealed that treatment with compound 23 altered many cell wall/membrane/envelope biogenesis-related genes in Gram-positive and Gram-negative bacteria. More importantly, compound 23 showed potent in vivo antibacterial efficacy in murine corneal infection models caused by Staphylococcus aureus or Pseudomonas aeruginosa. These findings would provide a new design idea for the discovery of novel broad-spectrum antibacterial agents to overcome the antibiotic resistance crisis.