We report the results of ultraviolet Raman spectroscopy of NiO, which allowed us to determine the spin-phonon coupling coefficients in this important antiferromagnetic material. The use of the second-order phonon scattering and ultraviolet laser excitation (λ = 325 nm) was essential for overcoming the problem of the optical selection rules and dominance of the two-magnon band in the visible Raman spectrum of NiO. We established that the spins of Ni atoms interact more strongly with the longitudinal than transverse optical phonons and produce opposite effects on the phonon energies. The peculiarities of the spin-phonon coupling are consistent with the trends given by density functional theory. The obtained results shed light on the nature of the spin-phonon coupling in antiferromagnetic insulators and can help in developing spintronic devices.