Ti–N and Ti–Al–N coatings are fabricated on LZ91 Mg–Li alloy by surface mechanical nanoalloying treatment (SMNAT) in nitrogen atmosphere at room temperature. This method is proposed to improve the high cost and high treatment temperature of preparing nitride coatings on Mg–Li alloys. The microstructure, phase compositions, and hardness of coatings are investigated systematically. Results show that Ti–N coating containing α‐Ti, β‐Ti, TiN0.3 and TiN0.9 phases can be prepared by SMNAT with pure titanium powder at room temperature under nitrogen atmosphere. The structure of Ti–N coating is a mixture of nanocrystalline and amorphous. The surface microhardness of Ti–N coating is 566.8 HV, which is about 80 HV higher than that of Ti coating obtained in argon atmosphere. By adding of the aluminum powders, a Ti–Al–N composite coating composed of nitrides (Ti3Al2N2, Ti2AlN, TiN0.76, and AlN) and intermetallics (Al11Ti5 and Al2Ti) is formed. The surface microhardness of Ti–Al–N composite coating reaches 743.2 HV, which is about 165.4 HV higher than that of Ti–Al coating obtained in argon atmosphere. Additionally, the continuity and uniformity of Ti–Al–N composite coating is improved due to which the Al powders can be seen as the bonding agent during SMNAT.