Compositional diffusion at interfaces often occurs during the synthesis of heterostructures, which poses a significant challenge to the reliability and performance of heterostructure-based electronic devices. In this study, the effect of interfacial compositional diffusion on the interfacial phonon transport in GaN/AlN heterostructures has been explored using molecular dynamics and phonon dynamics simulations. It is found the compositional diffusion results in a remarkable reduction in the interfacial thermal conductance (ITC) of the heterostructures, which can be modulated by tuning the compositional diffusion thickness. Phonon wave packet simulations further revealed that the energy transmission coefficient across the interface is strongly phonon frequency-dependent and interfacial morphology-dependent, which is consistent well with the calculated ITC of the structures. The phonon mode conversion and phonon localization are observed at the region of interfaces. Furthermore, it is found that the longitudinal acoustic phonons are more sensitive to the compositional diffusion interface than transverse-acoustic phonons do. However, it is interesting to find that the energy transmission coefficients of transverse-acoustic phonons with a high frequency (above 3.6 THz) across the compositional interface are abnormally higher than those across the sharp interface due to the stronger phonon mode conversion in the compositional diffusion region, which provides additional pathways for energy transmission. Our findings provide a deeper insight into the interfacial phonon scattering and transmission under the coupling effect of interfacial morphology and compositional diffusion.