Novel microwave absorption (MA) materials are still urgently demanded in military radars and communication satellites working in the frequency of 8-12 GHz (X band) and 12-18 GHz (Ku band). However, it remains a challenge to make a material completely satisfy the MA requirements. Here, Ti3CNTx nano-layered flakes were produced by HF etching of Ti3AlCN precursor and exhibited an attractive MA performance in X and Ku bands. The minimal reflection loss (RL) of Ti3CNTx was -41.36 dB at 11.76 GHz, with a sample thickness of 1.94 mm. Meanwhile, an effective absorption band (EAB) of 4.24 GHz (13.76-18 GHz) was achieved when the sample thickness is 1.5 mm. The introduction of N endows Ti3CNTx with magnetic properties and a better impedance matching. Spin-polarized density functional theory calculations confirmed that Ti3CNTx possesses magnetic moments. The magnetic moments mainly originate from the severe asymmetric spin of electrons of Ti atoms locating between N and functional groups induced by the unpaired electrons of N atoms. The synergetic effects of dielectric loss and magnetic loss mechanisms contribute to the MA performance of Ti3CNTx.