Phosphodiesterase 4B (PDE4B) is a key enzyme involved in regulating intracellular cyclic adenosine monophosphate levels and plays a significant role in the diagnosis, classification, treatment, and prognosis of various cancers. However, the role of PDE4B in gastric cancer (GC) remains unclear. We used the GEPIA2 (Gene Expression Profiling Interactive Analysis 2) database to analyze the differential expression level of PDE4B across tumor samples and verified our findings via qPCR and immunohistochemical analysis. We also analyzed the correlation between PDE4B expression levels and clinical pathological parameters, and prognosis, in the database. The effects of PDE4B on GC proliferation, migration, and invasion were evaluated through in vitro and in vivo experiments. Enrichment analysis was performed using bioinformatic tools, and results were validated by western blot analysis. The correlation between PDE4B expression and immune cell infiltration was investigated using bioinformatics tools. PDE4B is highly expressed in GC and is significantly associated with deep infiltration, distant metastasis, tumor, node, metastasis (TNM) stage, and preoperative CA199 levels. Over-expression of PDE4B promotes proliferation, clonal formation, migration, and invasion of GC cells and is associated with poor prognosis. PDE4B promotes the infiltration of immune cells into the tumor microenvironment (TME) and the phosphorylation of PI3K/AKT pathway, increasing MYC expression. PDE4B can serve as an independent prognostic biomarker for GC. We found that PDE4B can promote immune cell infiltration of the TME and mediate malignancy in gastric cancer through the PI3K/AKT/MYC pathway.