The spontaneous breakup of nanowires into nanospheres is of crucial significance preventing it from applications. In the present work, we propose a generalized stability criterion for nanowires, in contrast to the convectional Rayleigh stability theory that has been widely employed to understand the breakup-mechanism of nanowires. We demonstrate that the minimum instability wavelength is in contradiction to the convectional Rayleigh condition λcritical = 2πR0, where R0 and a are the radius of the nanowire and the amplitude of the perturbation, respectively. The modified theory is confirmed by the dynamic phase-field simulations of different nanowire shapes.