This study elucidates the fundamental governing mechanisms behind necking instability in granular materials, a phenomenon extensively documented in the literature yet lacking a clear explanation of its underlying causes. Our findings suggest that the phenomenon of tensile necking instability can be understood through the framework of anisotropic critical state theory, considering both local porosity and fabric anisotropy. To unravel these mechanisms, we construct a digital twin, using the level-set discrete element method (LS-DEM), of a Hostun sand specimen undergoing alternating cycles of triaxial compression and triaxial extension within an x-ray tomograph. The accuracy of the LS-DEM simulation is substantiated by its replication of the multiscale response observed in experiments, including macroscale stress–strain behavior, evolution of the deviatoric strain field, and notably, initiation and progression of necking during triaxial extension.