Gastric cancer (GC) is one of the most common malignant tumors and peritoneal metastasis is the primary cause for advanced GC’s mortality. Protein-tyrosine phosphatase 1B (PTP1B) functions as an oncogene and involves in carcinogenesis and cancer dissemination. However, the function and regulation of PTP1B in GC remain poorly understood. In this study, we found that PTP1B was upregulated in GC tissues and overexpression of PTP1B in vitro promoted cell migration and prevented apoptosis. Then, we predicted that PTP1B was a target of miR-338-3p and we revealed an inverse correlation between miR-338-3p levels and PTP1B protein levels in GC tissues. Next, we verified that PTP1B was inhibited by miR-338-3p via direct targeting to its 3′-untranslated regions. Moreover, overexpression of miR-338-3p in vitro attenuated GC cell migration and promoted apoptosis, and these effects could be partially reversed by reintroduction of PTP1B. Finally, we established an orthotopic xenograft model and a peritoneal dissemination model of GC to demonstrate that miR-338-3p restrained tumor growth and dissemination in vivo by targeting PTP1B. Taken together, our results highlight that PTP1B is an oncogene and is negatively regulated by miR-338-3p in GC, which may provide new insights into novel molecular therapeutic targets for GC.