Classification of apoptosis and necrosis by morphological differences has been widely used for decades. However, this usefulness of this method has been seriously questioned in recent years, mainly due to a lack of functional and biochemical evidence to interpret the morphology changes. To address this matter, we devised genetic manipulations in Drosophila to study pyknosis, a process of nuclear shrinkage and chromatin condensation that occurs in apoptosis and necrosis. By following the progression of necrotic pyknosis, we surprisingly observed a transient state of chromatin detachment from the nuclear envelope, followed by the nuclear envelope completely collapsing onto chromatin. This phenomenon led us to discover that phosphorylation of barrier-to-autointegration factor (BAF) mediates this initial separation of nuclear envelope from chromatin. Functionally, inhibition of BAF phosphorylation suppressed necrosis in both Drosophila and human cells, suggesting that necrotic pyknosis is conserved in the propagation of necrosis. In contrast, during apoptotic pyknosis the chromatin did not detach from the nuclear envelope and inhibition of BAF phosphorylation had no effect on apoptotic pyknosis and apoptosis. Our research provides the first genetic evidence supporting a morphological classification of apoptosis and necrosis through different forms of pyknosis.