In the present work, we systematically studied the effect of Al doping on the phase formation of iron nitride (Fe-N) thin films. Fe-N thin films with different concentration of Al (Al=0, 2, 3, 6, and 12 at.%) were deposited using dc magnetron sputtering by varying the nitrogen partial pressure between 0 to 100%. The structural and magnetic properties of the films were studied using X-ray diffraction and polarized neutron reflectivity. It was observed that at the lowest doping level (2 at.% of Al), nitrogen rich non-magnetic Fe-N phase gets formed at a lower nitrogen partial pressure as compared to the un-doped sample. Interestingly, we observed that as Al doping is increased beyond 3at.%, nitrogen rich non-magnetic Fe-N phase appears at higher nitrogen partial pressure as compared to un-doped sample. The thermal stability of films were also investigated. Un-doped Fe-N films deposited at 10% nitrogen partial pressure possess poor thermal stability. Doping of Al at 2at.% improves it marginally, whereas, for 3, 6 and 12at.% Al doping, it shows significant improvement. The obtained results have been explained in terms of thermodynamics of Fe-N and Al-N.