Thermal conductivity of AlxGa1−xN layers with 0 ≤ x ≤ 0.96 and variable thicknesses is systematically studied by combined thermoreflectance measurements and a modified Callaway model. We find a reduction in the thermal conductivity of AlxGa1−xN by more than one order of magnitude compared to that of GaN, which indicates a strong effect of phonon-alloy scattering. It is shown that the short-mean free path phonons are strongly scattered, which leads to a major contribution of the long-mean free path phonons to the thermal conductivity. In thin layers, the long-mean free path phonons become efficiently scattered by the boundaries, resulting in a further decrease in the thermal conductivity. Also, an asymmetry of thermal conductivity as a function of Al content is experimentally observed and attributed to the mass difference between Ga and Al host atoms.