First-principles calculations were performed to investigate the magnetic properties of Zn(Mn,Li)O based on the Perdew-Burke-Ernzerhof form of the generalized gradient approximation. Antiferromagnetic (AFM) ordering is the ground state in Mn-doped ZnO system without the codopant of Li, while seven different geometrical configurations of Zn(Mn,Li)O prefer stable ferromagnetic (FM) ordering. We found that dopant Li can effectively change the magnetic coupling in the ZnMnO system. The Curie temperature (T C ) of FM ordering depends on the geometric configuration, and the highest T C is about 1388 K. The FM stabilization is greatly affected by Mn-Mn distance rather than by the position of dopant Li. We propose that dopant Li mediates FM coupling through a double exchange interaction or an RKKY interaction when Li is located, respectively, near or far from Mn ions.