Carcinoma-associated fibroblasts (CAF) mediate the onset of a proinvasive tumour microenvironment. The proinflammatory cytokine LIF reprograms fibroblasts into a proinvasive phenotype, which promotes extracellular matrix remodelling and collective invasion of cancer cells. Here we unveil that exposure to LIF initiates an epigenetic switch leading to the constitutive activation of JAK1/STAT3 signalling, which results in sustained proinvasive activity of CAF. Mechanistically, p300-histone acetyltransferase acetylates STAT3, which, in turn, upregulates and activates the DNMT3b DNA methyltransferase. DNMT3b methylates CpG sites of the SHP-1 phosphatase promoter, which abrogates SHP-1 expression, and results in constitutive phosphorylation of JAK1. Sustained JAK1/STAT3 signalling is maintained by DNA methyltransferase DNMT1. Consistently, in human lung and head and neck carcinomas, STAT3 acetylation and phosphorylation are inversely correlated with SHP-1 expression. Combined inhibition of DNMT activities and JAK signalling, in vitro and in vivo, results in long-term reversion of CAF-associated proinvasive activity and restoration of the wild-type fibroblast phenotype.