Despite its size and rigidity, the nucleus is moved or reorganized by cytoskeletal filaments under various conditions1–11. Moreover, while chromatin organize into non-random domains12, extensive heterogeneity at the single-cell level13 means that precisely how and why nuclei reorganize remains an area of intense investigation. Here, we developed convolutional neural network (CNN)-based automated cell classification and analysis pipelines which revealed the extent to which human cytomegalovirus (HCMV) generates nuclear polarity through a virus-assembled microtubule-organizing center (MTOC). Tubulin acetylation enables microtubules emanating from this MTOC to rotate the nucleus via cytoplasmically exposed dynein-binding domains in the outer nuclear membrane protein, Nesprin-2G, which polarizes the inner nuclear membrane protein, SUN1. This in turn creates intranuclear polarity in Emerin to control nuclear actin filaments that spatially segregate viral DNA from inactive histones and host DNA, maximizing virus replication. Our findings uncover the extent to which viruses can control the nucleus from the cytoplasm.