We report the temperature-dependent Raman spectra of single- and few-layer MoSe2 and WSe2 in the range 77–700 K. We observed linear variation in the peak positions and widths of the bands arising from contributions of anharmonicity and thermal expansion. After characterization using atomic force microscopy and high-resolution transmission electron microscopy, the temperature coefficients of the Raman modes were determined. Interestingly, the temperature coefficient of the A22u mode is larger than that of the A1g mode, the latter being much smaller than the corresponding temperature coefficients of the same mode in single-layer MoS2 and of the G band of graphene. The temperature coefficients of the two modes in single-layer MoSe2 are larger than those of the same modes in single-layer WSe2. We have estimated thermal expansion coefficients and temperature dependence of the vibrational frequencies of MoS2 and MoSe2 within a quasi-harmonic approximation, with inputs from first-principles calculations based on density functional theory. We show that the contrasting temperature dependence of the Raman-active mode A1g in MoS2 and MoSe2 arises essentially from the difference in their strain–phonon coupling.