A wide range of explanations has been proposed for the origin of repetitive layering in mafic-ultramafic and in (per)alkaline intrusions. Here we propose that the interaction of mineral grains that sink and float in the crystallizing magma is an alternative mechanism that can explain many of the features of layered intrusions, without the need to invoke extrinsic factors. Similar to traffic jams on a motorway, small perturbations in crystal density develop that impede further ascent or descent of buoyant or heavy minerals, respectively. These “traffic jams” separate layers of magma from the rest of the magma chamber. The magma in the individual layers further evolves as a largely independent subsystem, with gravitational sorting organizing the mineral distribution within each layer. Layering can develop in the intermediate range between full mineral separation in low-viscosity or slowly cooling magma chambers and homogeneous crystallization in high-viscosity or fast-cooling chambers. This self-organization mechanism provides a novel explanation for the formation of rhythmic layering in low-viscosity magmas, for example in the Ilímaussaq igneous complex in southwest Greenland.