In this paper, a variationally improved Hulburt-Hirschfelder (VIHH) analytical potential energy function (APEF) is presented and tested. The VIHH potential is composed of the remedy function Λ(r) and the improved Hulburt-Hirschfelder (IHH) APEF which possesses the same explicit parameters (D_e,〖 ω〗_e,ω_e x_e,〖 B〗_e,α_e,r_e) with VIHH potential. Potential energy curves (PECs) for the ground electronic states of HI, HBr and KLi molecules have been modeled by the VIHH analytical potential, and it suggests that the VIHH potential is in good agreement of Rydberg-Klein-Rees (RKR) potential points and is superior to the original Hulburt-Hirschfelder (HH) potential, IHH potential and Morse potential, especially in the dissociation and the long-range region. The vibrational energy levels for the ground electronic state of the HI, HBr, and KLi molecules are obtained by numerically solving the radial Schrödinger equation using the LEVEL program for the case of the Morse potential, HH potential, IHH potential and the VIHH potential functions. The comparison for both vibrational energy levels and VIHH potential functions shows better agreement with the experimental data than the other potential functions. Comparing with IHH potential, the VIHH potential which included the remedy function Λ(r) has better physical behavior in the long-range region and the Λ(r) is effective for vanishing the invalid barrier.