Advanced pancreatic ductal adenocarcinoma (PDAC) and hepatocellular carcinoma (HCC) are non-curable diseases with a particularly poor prognosis. Over the last decade, research has increasingly focused on the microenvironment surrounding cancer cells, and its role in tumour development and progression. PDAC and HCC differ markedly regarding their pathological features: PDAC are typically stromal-predominant, desmoplastic, poorly vascularized tumours, whereas HCC are cellular and highly vascularized. Despite these very different settings, PDAC and HCC share transforming growth factor-β (TGF-β) as a common key-signalling mediator, involved in epithelial-to-mesenchymal transition, invasion, and stroma-tumour dialogue. Recently, novel drugs blocking the TGF-β pathway have entered clinical evaluation demonstrating activity in patients with advanced PDAC and HCC. TGF-β signalling is complex and mediates both pro- and anti-tumoural activities in cancer cells depending on their context, in space and time, and their microenvironment. In this review we provide a comprehensive overview of the role of the TGF-β pathway and its deregulation in PDAC and HCC development and progression at the cellular and microenvironment levels. We also summarize key preclinical and clinical data on the role of TGF-β as a target for therapeutic intervention in PDAC and HCC, and explore perspectives to optimize TGF-β inhibition therapy.