We propose the use of the second-order magnetic-gradient-induced coupling between the nitrogen-vacancy center and the mechanical resonator for exploring the phonon-blockade effect in a hybrid system. This quantum effect essentially originates from the energy-level anharmonicity of the spin-mechanical system. Specifically, the second-order magnetic gradient could induce the two-phonon nonlinear coupling between spin qubits and phonons, which ultimately allows for the generation of phonon blockade. Moreover, this magnetically induced nonlinearity can be adjusted and enhanced to the strong-coupling regime. In this regime, we investigate the statistical characteristics of phonons by calculating the second-order correlation function numerically and analytically. In particular, we find that the antibunching effect of phonons is robust against the spin dephasing rate. This could provide an advantage and relax the required conditions for observing the phonon quantum effects from the perspective of experimental feasibility. Our work provides an alternative way, i.e., magnetically induced mechanical nonlinearity, to manipulate the mechanical quantum effects. Combined with the current quantum technologies, this study may extend the functionalities of hybrid systems and has potential applications in quantum information processing.