Phosphatidylinositol 3-kinase beta (PI3K beta) is the dominant isoform of PI3K and has been implicated in thrombosis as well as phosphatase and tensin homologue-loss-induced tumorigenesis. PI3K beta has been considered to be an attractive target for anticancer drug discovery, and several PI3K beta inhibitors have progressed into clinical trials. Here, we disclose the discovery of two natural products (PBY-0002 and PBY-0006) that have inhibitory effects on PI3K beta. These two natural products were identified through pharmacophore-based virtual screening, molecular docking, and a molecular dynamics simulation. Furthermore, an in vitro assay against human gastric cancer cell lines revealed that these two compounds showed anticancer activity. To identify the binding modes of PBY-0002 and PBY-0006 further, we performed a systematical investigation with comparison to the binding mode of GSK2636711, which is a known PI3K beta inhibitor. The results demonstrated that PBY-0002 and PBY-0006 were tightly embedded into the ATP-binding site via hydrogen bonds and pi-cation interactions. These two natural products can provide a promising starting point for the rational design of potent analogs with inhibitory activity against PI3K beta.