Background: Recently, natural products have gained increasing attention. Endophytic bacteria represent a source of natural anticancer products, and are well-known for producing diverse bioactive anti-cancer compounds. Herein, we investigated the antitumor activity of exopolysaccharides (EPSs) extracted from endophytes in Ophiopogon japonicus . Methods: The endophyte bacterium MD4 was isolated from O. japonicus . To identify MD4, a partial sequence of 16S rDNA was analyzed. The phenol-sulfuric acid method was used to measure the EPSs concentration. Cell viability was tested by the MTT assay to quantify the EPS cytotoxicity effect. Wounding healing, gelatin zymography, and ELISA were used to measure cell migration ability. Results: MD4 was identified as a Staphylococcus sp . with 99% similarity. The results of the phenol sulfuric acid method showed that the purified EPS concentration from MD4 was 28.068 µg/µL. There was a concentration-dependent cytotoxic effect of MD4-EPS on MC-4 cells, with IC50 values of 0.891 µg/µL. The results of the MTT assay showed that MD4-EPS effectively inhibited the migration of MC-4 cells as the concentration increased. The gelatin zymography analysis showed that the enzymatic activities of the migration-related MMP2 and MMP9 proteins decreased after EPS treatment. Furthermore, the protein secretion levels of MMP2 and MMP9 after MD4-EPS treatment were significantly lower than those in the control and PBS groups. Conclusions: Our results demonstrate that the EPSs derived from the MD4 endophyte of O. japonicus acted as natural antitumor agents to inhibit the migration of gastric cancer cells.