We analyze the photothermal response of nanoelectromechanical systems (NEMS) integrated in a silicon photonic circuit over a wide frequency range. The dynamic response of NEMS devices is studied using a two-color pump-probe scheme in an on-chip photonic Mach-Zehnder interferometer. The measured response is composed of three contributions: (i) the mechanical response of the NEMS device, (ii) the thermal response of the substrate due to diffusive heating, and (iii) self-heating of the NEMS beam. Analytical and numerical studies of the self-heating effect reveal a first-order thermal roll-off behavior in close agreement with experimental results. Device actuation due to self-heating of the beam is shown to dominate other effects at low frequencies, while an exponential roll-off with 20 dB per decade at high frequencies is observed.