The convergence of a cluster expansion for lithium transition metal oxides is improved by explicit treatment of transition metal (TM) magnetic moments. The approach is applied to layered LiCo y Ni 1-y O 2 (NC). The ground state and low-lying excited state structures are identified and the distribution of TM ions and magnetic moment in those structures is investigated to explain the origin of Ni-antisite ions and Jahn-Teller distortion. The developed model also reveals the mechanisms governing the atomic arrangement of NC, including in-plane Co-Co vs. Co-Ni competition, magnetic frustration vs. disproportionation competition, and cationic interactions spanning adjacent layers.2