Data generated at the published investigation: Haptotaxis is the process of directed cell migration along gradients of extracellular matrix density and is central to morphogenesis, immune response and cancer invasion. It is commonly assumed that cells respond to these gradients by migrating directionally towards the regions of highest ligand density. In contrast with this view, here we show that cells exposed to micropatterned fibronectin gradients exhibit a wide range of complex trajectories, including directed haptotactic migration up the gradient but also linear oscillations and circles with extended periods of migration down the gradient. To explain this behaviour, we developed a biophysical model of haptotactic cell migration based on a coarse-grained molecular clutch model coupled to persistent stochastic polarity dynamics. While initial haptotactic migration is explained by the differential friction at the front and back of the cell, the observed complex trajectories over longer time scales arise from the interplay between differential friction, persistence, and physical confinement. Overall, our study reveals that confinement and persistence modulate the ability of cells to sense and respond to haptotactic cues and provides a framework to understand how cells navigate complex environments.