Coupled linear Boltzmann transport and hydrodynamic (CoLBT-hydro) model has been developed for simultaneous simulations of jet propagation and jet-induced medium excitation in heavy-ion collisions. Within this coupled approach, the final reconstructed jets in heavy-ion collisions include not only hadrons from the hadronization of medium modified jet shower partons from the linear Boltzmann transport (LBT) but also hadrons from the freeze-out of the jet-induced medium excitation in the hydrodynamic evolution of the bulk medium. Using the CoLBT-hydro model, we study medium modification of the fragmentation functions of γ-triggered jets in high-energy heavy-ion collisions at the Large Hadron Collider. The CoLBT-hydro model is shown to describe the experimental data not only on the suppression of leading hadrons within the jet cone at large momentum fraction zγ=pTh/pTγ relative to the transverse momentum of the trigger photon due to parton energy loss but also the enhancement of soft hadrons at small zγ and zjet=pTh/pTjet due to jet-induced medium excitation. There is no suppression of the fragmentation function, however, at large momentum fraction zjet relative to the transverse momentum of the reconstructed jet due to trigger bias and medium modification of quark to gluon jet fraction. For jets whose final transverse momenta are comparable to or larger than that of the trigger photon, the trigger bias can lead to enhancement of the jet fragmentation function at large zjet.