Stenotrophomonas maltophilia is a model organism exhibiting intrinsic antibiotic resistance, primarily due to its production of Mβ-lactamase enzymes that inactivate β-lactam antibiotics. This study aims to synthesize an azo derivative containing an oxazepine ring as a potential inhibitor of Mβ-lactamase. The molecular docking results revealed that the binding energies of the Mβ-lactamases ranged from − 5.95 to − 6.09 kcal/mol, indicating favourable interactions with the synthesized compounds. Two compounds were prepared: the first via aldol condensation of (A1) with p-hydroxybenzaldehyde to form (K1) and the second through Azo-Schiff base formation from 3,5-dimethylaniline, resulting in (L2) and (L18). Characterization of these compounds was conducted via FT-IR, CHN, 1H NMR, and 13C NMR spectroscopy. Antimicrobial activity was assessed through minimum inhibitory concentration (MIC) and minimum bacterial concentration (MBC) tests, which yielded values ranging from 1.19 ± 1 to 0.02 µg/mL and from 1.12 ± 1 to > 0.04 µg/mL, respectively. Notably, the MBC/MIC ratios indicated that L2 and L18 exhibited significant bactericidal activity. In silico analysis via MOE 2015 software allowed us to determine the binding poses and energies of the synthesized inhibitors against Mβ-lactamase (PDB ID: 6UAF). The most stable conformation from the docking results was selected for further evaluation. Compared with standard ceftazidime, the synthesized compounds significantly inhibited Mβ-lactamase activity. Additionally, ADMET analysis indicated favourable pharmacokinetic profiles and low toxicity, suggesting promising oral drug-like properties for the synthesized molecules.