In recent years, matrix viscoelasticity has emerged as a potent regulator of fundamental cellular processes and has been implicated in promoting cancer progression. Alongside viscoelasticity, additional ECM cues have been shown to influence migration decision-making of cancer cells, and spatial confinement is now considered as a potential regulator of metastasis. However, our understanding of these complex processes predominantly relies on purely elastic hydrogels, and the exact relationship between matrix viscoelasticity and spatial confinement in driving epithelial cell mechanotransduction and migration during cancer progression remains unclear. Here, we systematically investigated the interplay between matrix stiffness, viscoelasticity and spatial confinement by engineering soft (∼0.3 kPa) and stiff (∼3 kPa) polyacrylamide hydrogels with varying degrees of viscous dissipation, mirroring the mechanical properties of healthy and tumoral conditions in breast tissue. We observed that viscoelasticity modulates cell spreading, focal adhesions and YAP nuclear import in opposite directions on soft and stiff substrates. Strikingly, viscoelasticity enhances migration speed and persistence on soft substrates, while impeding them on stiff substrates via actin retrograde flow regulation. Combining soft micropatterning with viscoelastic hydrogels, we also show that spatial confinement restricts cell migration on soft matrices regardless of matrix viscoelasticity and promotes migration on stiff matrices in a viscoelasticity-dependent fashion. Our findings establish substrate viscoelasticity as a key regulator of epithelial cell functions and unravel the role of the matrix dimensionality in this process.SignificanceWhile matrix elasticity has received significant attention, recent findings underscore the importance of its natural dissipative properties and spatial confinement in regulating cellular processes and tumour invasiveness. However, the intricate interplay between viscoelasticity and spatial confinement in orchestrating epithelial cell behaviour during cancer progression remains elusive. Using micropatterned viscoelastic hydrogels to replicate the mechanical properties encountered during breast tumour progression, we unveil that viscoelasticity modulates cell behaviour and mechanotransduction signals differently on soft and stiff substrates. Increased viscoelasticity enhances migration speed and persistence on soft substrates while impeding them on stiff substrates via actin retrograde flow regulation. Furthermore, spatial confinement restricts cell migration on soft matrices regardless of viscoelasticity, while promoting migration on stiff matrices in a viscoelasticity-dependent manner.