While DNA replication and mitosis occur in a sequential manner, precisely how cells maintain their temporal separation and order remains elusive. Here, we unveil a double-negative feedback loop between replication intermediates and an M-phase-specific structure-selective endonuclease, MUS81-SLX4, which renders DNA replication and mitosis mutually exclusive. MUS81 nuclease is constitutively active throughout the cell cycle but requires association with SLX4 for efficient substrate targeting. To preclude toxic processing of replicating chromosomes, WEE1 kinase restrains CDK1 and PLK1-mediated MUS81-SLX4 assembly during S phase. Accordingly, WEE1 inhibition triggers widespread nucleolytic breakage of replication intermediates, halting DNA replication and leading to chromosome pulverization. Unexpectedly, premature entry into mitosis-licensed by unrestrained CDK1 activity during S phaserequires MUS81-SLX4, which inhibits DNA replication. This suggests that ongoing replication assists WEE1 in delaying entry into M phase and, indirectly, in preventing MUS81-SLX4 assembly. Conversely, MUS81-SLX4 activation during mitosis promotes targeted resolution of persistent replication intermediates, which safeguards chromosome segregation. Unexpectedly, premature entry into mitosis -licensed by unrestrained CDK1 activity during S-phase-requires MUS81-SLX4, which inhibits DNA replication. This suggests that ongoing replication assists WEE1 in delaying entry into M-phase and, indirectly, in preventing MUS81-SLX4 assembly. Conversely, MUS81-SLX4 activation during mitosis promotes targeted resolution of persistent replication intermediates, which safeguards chromosome segregation.3