The transverse momentum distribution of J/ψ mesons produced in pp collisions at the center-of-mass energy 5 TeV, 7 TeV, and 13 TeV is described by the modified Hagedorn function which is based on the Tsallis function and Hagedorn function. The calculated results by the modified Hagedorn function are in accord with experimental data measured by the LHCb Collaboration at LHC. The related parameters are obtained and analyzed.