Based on the observation that the heavy quark -anti-quark potential value at infinity corresponds to twice the D meson mass, we constrain the asymptotic value of the heavy quark potential in a hot medium through a QCD sum rule calculation of the D meson at finite temperature. We find that to correctly reproduce the QCD sum rule results as well as a recent model calculation for the D meson mass near the critical temperature, the heavy quark potential should be composed mostly of the free energy with an addition of a small but non-trivial fraction of the internal energy. Combined with a previous study comparing potential model results for the J/ψ to a QCD sum rule calculation, we conclude that the composition of the effective heavy quark potential should depend on the interquark distance. Namely, the potential is dominated by the free energy at short distance, while at larger separation, it has a fraction of about 20% of internal energy.