Cy3, a cyanine dye, is one of the most widely used dyes in investigating the structure and dynamics of biomolecules by means of fluorescence methods. However, Cy3 fluorescence emission is strongly competed by trans-cis isomerization, whose efficiency is dictated by the isomerization energy barrier and the environment of Cy3. The fluorescence quantum yield of Cy3 is very low when the dye is free in homogeneous solution but it is considerably enhanced in an environment that rigidifies the structure, e.g. when it is attached to a DNA strand. In this work, the barriers for isomerization on the excited state of free Cy3, and Cy3 attached to single- and double-stranded DNA in methanol, are presented. The free energy and subsequently the isomerization barrier calculations are performed using the umbrella sampling technique with the weighted histogram analysis method. The hybrid quantum mechanics/molecular mechanics (QM/MM) approach is employed to provide the potential energy surfaces for the excited state dynamics simulations in umbrella sampling. The semiempirical floating occupation molecular orbital configuration interaction method is used for electronic excited state calculations of the QM region (Cy3). From the free energy calculations, the barrier of Cy3 attached to the single-stranded DNA is highest, in agreement with previously reported experimental results. This is likely due to the stacking interaction between Cy3 and DNA. Such a stacking interaction is likely associated with steric hindrance that prevents the rotation around the conjugated bonds of Cy3. If Cy3 experiences high steric hindrance, it has a higher isomerization barrier and thus the efficiency of fluorescence emission increases.