Recently, the LHAASO Collaboration published the detection of 12 ultrahigh-energy γ-ray sources above 100 TeV, with the highest energy photon reaching 1.4 PeV. The first detection of PeV γ rays from astrophysical sources may provide a very sensitive probe of the effect of the Lorentz invariance violation (LIV), which results in decay of high-energy γ rays in the superluminal scenario and hence a sharp cutoff of the energy spectrum. Two highest energy sources are studied in this work. No signature of the existence of the LIV is found in their energy spectra, and the lower limits on the LIV energy scale are derived. Our results show that the first-order LIV energy scale should be higher than about 10^{5} times the Planck scale M_{Pl} and that the second-order LIV scale is >10^{-3}M_{Pl}. Both limits improve by at least one order of magnitude the previous results.