Aliovalent anion substitution in ZnO, CdS, and related materials brings about drastic changes in their electronic structure and properties, making them colored, with a narrow band gap. Progressive substitution of N and F in ZnO leads to the formation of Zn2NF, with complete replacement of O with N and F. The band gaps of Zn2NF and O‐doped Zn2NF are smaller than the band gap in ZnO, because N 2p states create a new sub‐band above the valence band. Band‐edge energies of these compounds are thermodynamically favorable for water splitting. First‐principles calculations of P‐ and Cl‐substituted CdS and ZnS show the presence of a band just above the valence band, due to the p orbitals of the trivalent dopant, resulting in a noticeable reduction in the band gap of these materials. Such substitution of anions can be quite effective in engineering the valence band, and hence, in tuning the related properties of materials. Complete substitution of S with P and Cl in CdS should result Cd2PCl, but the resulting material is Cd2PCl1.5 or Cd4P2Cl3. Cd4P2Cl3 shows a band gap of 2.36 eV and a photoluminescence band at 580 nm. First‐principles calculations show it to be an effective photocatalyst for water splitting; it is shown experimentally to exhibit photocatalytic hydrogen evolution in the presence and absence of a sacrificial agent. Moreover, resilience to photocorrosion is a unique property of Cd4P2Cl3.