The impact of magnetism on chemical ordering in face-centered cubic CrCoNi medium entropy alloy is studied by a combination of ab initio simulations, machine learning potentials, and Monte Carlo simulations. Large magnetic energies are revealed for some mixed L12 /L10 type ordered configurations, which are rooted in strong nearest-neighbor magnetic exchange interactions and chemical bonding among the constituent elements. There is a delicate interplay between magnetism and stability of MoPt2 and L12 /L10 type of ordering which may explain opposing experimental and theoretical findings.