Objective The leaves of Alstonia boonei and aerial parts of Ipomoea cairica are used for treatment of microbial infections among other ailments in African traditional medicine. The aim of this study was to investigate the antimicrobial phytochemicals in A. boonei leaves and Ipomoea cairica aerial parts to validate their traditional use in Ugandan herbal medicine. Methods The plant materials were separately extracted using a dichloromethane/methanol (1:1) solvent system and subjected to repeated chromatographic separation to isolate pure compounds. The chemical structures of the isolated compounds were determined through 1H NMR, 13C NMR and 2D NMR (COSY, HSQC and HMBC). The antibacterial activity of the extracts and pure compounds were assessed using the agar well diffusion method. Results Chromatographic fractionation of the extracts yielded trans-fagaramide and a pentacyclic lupane-type triterpenoid, lupeol, from A. boonei, and friedelin from I. cairica. Trans-fagaramide was identified for the first time in the Alstonia genus while friedelin was identified for the first time in I. cairica. The isolated compounds demonstrated antibacterial activity, with trans-fagaramide showing a minimum inhibitory concentration (MIC) of 125 μg/mL against Pseudomonas aeruginosa and 250 μg/mL against Staphylococcus aureus, Salmonella typhi and Escherichia coli. Friedelin exhibited a MIC of 125 μg/mL against Escherichia coli and 250 μg/mL against Pseudomonas aeruginosa, Staphylococcus aureus and Salmonella typhi. Conclusion The antibacterial activities observed in this study support the traditional use of A. boonei and I. cairica by indigenous communities in Uganda for treating microbial infections.