Using non-equilibrium molecular dynamics simulations, we have studied the effect of disorder on the thermal conductivity of two-dimensional (2D) C1-xNx alloys. We find that the thermal conductivity not only depends on the substitution concentration of nitrogen, but also strongly depends on the disorder distribution. A general linear relationship is revealed between the thermal conductivity and the participation ratio of phonons in 2D alloys. Localization mode analysis further indicates that the thermal conductivity variation in the ordered alloys can be attributed to the number of inequivalent atoms. As for the disordered alloys, we find that the thermal conductivity variation can be described by a simple linear formula with the disorder degree and the substitution concentration. The present study suggests some general guidance for phonon manipulation and thermal engineering in low dimensional alloys.