In many biological phenomena, cells migrate through confining structured environments. We study how migrating cells overcome physical obstacles in the form of a thin constriction. Specifically, we ask whether such confined migration exhibits emergent stochastic dynamical laws. To this end, we develop two-state micropatterns, consisting of two adhesive sites connected by a thin constriction, allowing the cells to perform repeated stochastic transitions between the sites. For this minimal system, we obtain a large data set of single cell trajectories, enabling us to infer an equation of cell motion, which decomposes the dynamics into deterministic and stochastic contributions. Our data-driven approach reveals that these cells exhibit intricate non-linear migratory dynamics, with qualitatively similar features for cancerous (MDA-MB-231) and non-cancerous (MCF10A) cells. In both cases, the cells drive themselves deterministically into the thin constriction, a process that is sped up by noise. Interestingly, the deterministic dynamics of the cancerous cells exhibits a limit cycle, while the non-cancerous cells show excitable bistable dynamics.