The relationship between deexcitation energies of superdeformed secondary minima relative to ground states and the density dependence of the symmetry energy is investigated for heavy nuclei using the relativistic mean field (RMF) model. It is shown that the deexcitation energies of superdeformed secondary minima are sensitive to differences in the symmetry energy that are mimicked by the isoscalar-isovector coupling included in the model. With deliberate investigations on a few Hg isotopes that have data of deexcitation energies, we find that the description for the deexcitation energies can be improved due to the softening of the symmetry energy. Further, we have investigated deexcitation energies of odd-odd heavy nuclei that are nearly independent of pairing correlations, and have discussed the possible extraction of the constraint on the density dependence of the symmetry energy with the measurement of deexcitation energies of these nuclei.