Background: Metformin, a traditional first-line anti-hyperglycemic agent for diabetes, recently exhibits better antitumor effect in hepatocellular carcinoma (HCC). However, its resistance and tolerance mechanism in HCC remains largely unknown. Here, we investigated whether increased matrix stiffness attenuated the intervention effects of metformin on HCC invasion and metastasis, and explored its underlying molecular mechanism. Methods: FN-coated gel substrates with 6, 10, and 16 kPa, which simulated the stiffness of normal, fibrotic, and cirrhotic liver tissues respectively, were established to evaluate matrix stiffness-mediated effects on HCC cells. Alterations in morphology, proliferation, motility, and invasive/metastatic-associated genes (PTEN, MMP2, MMP9) of HCC cells grown on different-stiffness substrates were comparatively analyzed before and after metformin intervention. Subsequently, the underlying molecular mechanism by which higher matrix stiffness attenuates antitumor effects of metformin in HCC was further elucidated. Results: Metformin significantly inhibited proliferation, migration, and invasion of HCC cells. Compared with the controls on lower-stiffness substrate, HCC cells grown on higher-stiffness substrate exhibited an obvious resistance to intervention effects of metformin on proliferation, migration, invasion and metastasis. High stiffness stimulation significantly activated the miR-17-5p/PTEN/PI3K/Akt signaling pathway in HCC cells via integrin β1 and in turn resulted in MMP2 and MMP9 upregulation. Meanwhile, integrin β1 knockdown or PI3K inhibitor partially reversed the activation of the above signaling molecules. For HCC cells grown on the same-stiffness substrate, metformin remarkably upregulated PTEN expression and suppressed the activation of the PI3K/Akt/MMP pathway, but no effect on integrin β1 expression. Importantly, the increase in fold of PTEN expression and decrease in folds of Akt phosphorylation level and MMP2