A doping strategy for hexagonal boron nitride ͑h-BN͒ is proposed through hybrid Hartree-Fock density functional calculations. Unlike their behavior in typical semiconductors, substitutional dopants generate deep and localized in-gap states in h-BN. In contrast, intercalated atoms with high and low electronegativities perturb the host valence and conduction bands weakly, resulting in shallow acceptor and donor states, respectively. The formation of defect complexes involving substitutional dopants suppresses the migration of the intercalated dopants, with the shallow acceptor or donor characteristics preserved. The strategy proposed here is also applicable to h-BN ultrathin layers and extendable to the doping of BN single sheets via adsorption.