A one-step NH 3 /Ar plasma treatment method was used to obtain few-layered and nitrogen-doped Ti 3 C 2 T x MXene as highly efficient hydrogen and oxygen evolution reaction electrocatalyst. • Nitrogen-doped Ti 3 C 2 T x MXene was prepared by one-step NH 3 /Ar plasma treatment. • The N content of MXene are adjusted by controlling volume ratio of NH 3 and Ar. • The surface-adsorbed N effectively reduces the energy barrier of the reaction. Constructing two-dimensional MXene surface defects can greatly improve electrocatalytic performance. Herein, a one-step NH 3 /Ar plasma treatment method was used to obtain few-layered and nitrogen-doped Ti 3 C 2 T x MXene. The structural properties and nitrogen content of MXene were adjusted by controlling the volume ratio of NH 3 and Ar in the plasma gas. When the volume ratio of ammonia-to-argon was 6:1, the obtained Ti 3 C 2 T x -N 6 had the largest C lattice parameter (13.53 Å), the highest nitrogen content (1.57 wt%), and the lowest HER overpotential of 119.17 mV. The XPS results and DFT calculations showed that Ti 3 C 2 T x -N 6 introduced the most surface-adsorbed N, which reduced the energy barrier of electrocatalytic reactions of MXene.