The inelastic charmonium (J/ψ, ψ(2S), ηc, hc and χcJ ) and bottomonium (Υ(nS), η b , h b , and χ bJ ) photoproductions in ultrarelativistic heavy-ion collisions at LHC energies are studied, where the fragmentation processes are included. Based on the factorization formalism of non-relativistic QCD, an exact treatment is developed, which can weight the contribution from different channels and recovers the Weizsäcker-Williams approximation (WWA) near the region Q 2 ∼ 0. The relevant kinematical relations are also achieved. We present a comprehensive analysis for the properties of WWA in heavy-ion collisions, and discuss the contribution of inelastic photoproduction processes to the heavy quarkonium production. The Q 2 -, y-, √ s-, and pT -dependent cross sections, and the total cross sections are estimated. It is shown that the inelastic photoproduction and fragmentation processes can provide the evident modification to the heavy quarkonium production in p-p and P b-P b collisions at LHC energies, where the ultra-incoherent photon emission plays a very important role. Moreover, the WWA is only effective in very restricted domains, and the exact treatment can naturally avoid double counting and WWA errors.