During cancer metastasis, tumor cells penetrate tissues through tight interstitial spaces, requiring extensive deformation of the cell and its nucleus. Here, we investigated tumor cell migration in confining microenvironments in vitro and in vivo. Nuclear deformation caused localized loss of nuclear envelope (NE) integrity, which led to the uncontrolled exchange of nucleo-cytoplasmic content, herniation of chromatin across the NE, and DNA damage. The incidence of NE rupture increased with cell confinement and with depletion of nuclear lamins, NE proteins that structurally support the nucleus. Cells restored NE integrity using components of the endosomal sorting complexes required for transport-III (ESCRT-III) machinery. Our findings indicate that cell migration incurs substantial physical stress on the NE and its content, requiring efficient NE and DNA damage repair for survival.