Antimicrobial resistance (AMR) poses a critical global health threat, underscoring the urgent need for innovative antibiotic discovery strategies. While recent advances in peptide design have yielded numerous antimicrobial agents, optimizing these molecules experimentally remains challenging due to unpredictable and resource-intensive trial-and-error approaches. Here, we introduce APEX Generative Optimization (APEX GO ), a generative artificial intelligence (AI) framework that integrates a transformer-based variational autoencoder with Bayesian optimization to design and optimize antimicrobial peptides. Unlike traditional supervised learning approaches that screen fixed databases of existing molecules, APEX GO generates entirely novel peptide sequences through arbitrary modifications of template peptides, representing a paradigm shift in peptide design and antibiotic discovery. Our framework introduces a new peptide variational autoencoder with design and diversity constraints to maintain similarity to specific templates while enabling sequence innovation. This work represents the first in vitro and in vivo experimental validation of generative Bayesian optimization in any setting. Using ten de-extinct peptides as templates, APEX GO generated optimized derivatives with enhanced antimicrobial properties. We synthesized 100 of these optimized peptides and conducted comprehensive in vitro characterizations, including assessments of antimicrobial activity, mechanism of action, secondary structure, and cytotoxicity. Notably, APEX GO achieved an outstanding 85% ground-truth experimental hit rate and a 72% success rate in enhancing antimicrobial activity against clinically relevant Gram-negative pathogens, outperforming previously reported methods for antibiotic discovery and optimization. In preclinical mouse models of Acinetobacter baumannii infection, several AI-optimized molecules-most notably derivatives of mammuthusin-3 and mylodonin-2-exhibited potent anti-infective activity comparable to or exceeding that of polymyxin B, a widely used last-resort antibiotic. These findings highlight the potential of APEX GO as a novel generative AI approach for peptide design and antibiotic optimization, offering a powerful tool to accelerate antibiotic discovery and address the escalating challenge of AMR.