We analyze the atomistic mechanisms driving the compositional correlation of In and N in the quaternary Inx Ga1-xAs1-yNy alloys combining atomic scale chemical analysis in transmission electron microscopy and density-functional theory calculations. Our results show that for typical growth conditions surface kinetics prevail over bulk thermodynamics resulting in a hitherto unexpected compositional anticorrelation between In and N.