The concentration N
S and the low-temperature mobility µ of two-dimensional electron gas in GaAs/AlGaAs selectively doped heterojunctions have been studied theoretically and experimentally for the case where ionized impurities are present at heterointerfaces. It is found that N
S scarcely changes when the concentration N
IF of interfacial impurities is below 1×1011 cm-2, but it rapidly disappears at higher values of N
IF if the impurities are of the acceptor type. In contrast, the mobility is found to decrease substantially even when N
IF is as low as 109 cm-2. Based on these results, a quantitative guideline is drawn on the acceptable level of contamination in ultrahigh-vacuum wafer processings including molecular beam epitaxial regrowth.