Half-Heusler compounds with 18 valence electrons per unit cell are well-known nonmagnetic semiconductors. Employing first-principles electronic band-structure calculations, we study the interface properties of the half-Heusler heterojunctions based on FeVSb, CoTiSb, CoVSn, and NiTiSn compounds, which belong to this category of materials. Our results show that several of these heterojunction interfaces become not only metallic but also magnetic. The emergence of spin-polarization is accompanied by the formation of two-dimensional electron gas or hole gas at the interface. A qualitative analysis of the origin of the spin polarization at the interfaces suggests that strong correlations are responsible. For the cases of magnetic interfaces where half-metallicity is also present, we propose a modified Slater-Pauling rule similar to the one for bulk half-metallic half-Heusler compounds. Additionally, we calculate exchange parameters, Curie temperatures, and magnetic anisotropy energies for magnetic interfaces. Our study, along with recent experimental evidence confirming the presence of two-dimensional electron gas at CoTiSb/NiTiSn heterojunctions, may motivate future efforts to explore and realize device applications using these heterojunctions.