Two series of Mg substituted and F substituted nickelates were prepared, among them Li1−z Ni1+z F y O2−y (y=0.015, z=0.06) and Li1−z (Mg x Ni1−x )1+z O2 (x=0.05, z=0.08) have shown improved cycling performance compared to un-substituted LiNiO2. Cyclic voltametry (CV), quasi open circuit voltage (QOCV) measurements, and X-ray diffraction all indicate that phase transitions in the charge and discharge reactions are partially suppressed after F or Mg substitution. Excessive substitution, however, results in reduced capacity and the lack of electrochemical activity. For Li1−z Ni1+z F y O2−y this is explained by the increasing presence of divalent nickel ions at the lithium 3b sites. For Li1−z (Mg x Ni1−x )1+z O2, the presence of Mg ions at the lithium sites is more likely the reason.