The non-receptor protein tyrosine phosphatase SHP2, encoded by PTPN11, has an important role in signal transduction downstream of growth factor receptor signalling and was the first reported oncogenic tyrosine phosphatase. Activating mutations of SHP2 have been associated with developmental pathologies such as Noonan syndrome and are found in multiple cancer types, including leukaemia, lung and breast cancer and neuroblastoma. SHP2 is ubiquitously expressed and regulates cell survival and proliferation primarily through activation of the RAS–ERK signalling pathway. It is also a key mediator of the programmed cell death 1 (PD-1) and B- and T-lymphocyte attenuator (BTLA) immune checkpoint pathways. Reduction of SHP2 activity suppresses tumour cell growth and is a potential target of cancer therapy. Here we report the discovery of a highly potent (IC50 = 0.071 μM), selective and orally bioavailable small-molecule SHP2 inhibitor, SHP099, that stabilizes SHP2 in an auto-inhibited conformation. SHP099 concurrently binds to the interface of the N-terminal SH2, C-terminal SH2, and protein tyrosine phosphatase domains, thus inhibiting SHP2 activity through an allosteric mechanism. SHP099 suppresses RAS–ERK signalling to inhibit the proliferation of receptor-tyrosine-kinase-driven human cancer cells in vitro and is efficacious in mouse tumour xenograft models. Together, these data demonstrate that pharmacological inhibition of SHP2 is a valid therapeutic approach for the treatment of cancers.