We formulate the on-site occupation dependent exchange correlation energy and effective potential of hybrid functionals for localized states and connect them to the on-site correction term of the DFT+U method. Our derivation provides a theoretical justification for adding a DFT+U-like onsite potential in hybrid DFT calculations to resolve issues caused by overscreening of localized states. The resulting scheme, hybrid- DFT+Vw, is tested for chromium impurity in wurtzite AlN and vanadium impurity in 4H-SiC, which are paradigm examples of systems with different degree of localization between host and impurity orbitals.