The detection of high-energy neutrino coincident with the blazar TXS 0506 þ 056 provides a unique opportunity to test Lorentz invariance violation (LIV) in the neutrino sector. Thanks to the precisely measured redshift, i.e., z ¼ 0.3365, the comoving distance of the neutrino source is determined. In this work, we obtain and discuss the constraints on the superluminal neutrino velocity δ ν and the LIV by considering the energy loss of superluminal neutrino during propagation. Given superluminal electron velocity (δ e ≥ 0), a very stringent constraint on superluminal neutrino velocity can be reached, i.e., δ ν ≲ 1.3 × 10 −18 , corresponding to the quantum gravity (QG) scale M QG;1 ≳ 5.7 × 10 3 M Pl and M QG;2 ≳ 9.3 × 10 −6 M Pl for linear (quadratic) LIV, which are ∼12 orders of magnitude tighter for linear LIV and ∼9 orders tighter for quadratic LIV compared to the time-of-flight constraint from MeV neutrinos of SN 1987A. While given the subluminal electron velocity, a weaker constraint on the superluminal neutrino velocity is obtained, i.e., δ ν ≲ 8 × 10 −17 , which is consistent with the conclusions of previous works. We also study the neutrino detection probability due to the distortion of neutrino spectral shape during propagation, which gives slightly weaker constraints than above by a factor of ∼2.