The development of innovative and efficient strategy is of paramount importance for near-infrared (NIR) electrochemiluminescence (ECL) sensing, which can substantially promote ECL detection in a wide range of situations. Herein, the inner filter effect (IFE) strategy was designed to construct an ultrasensitive NIR ECL biosensor based on the well-matched AgBr nanocrystals (NCs) decorated nitrogen-doped Ti3C2 MXene nanocomposites (AgBr–N–Ti3C2) and hydrated defective tungsten oxide nanosheets (dWO3•H2O). Specifically, the AgBr–N–Ti3C2 nanocomposites displayed extremely effective NIR ECL emission because N-doping could accelerate electron transfer and boost the red-shift of the ECL spectrum. The nonmetallic plasmon dWO3•H2O was used as an absorber due to its facile tuning of the spectra overlap and higher molar extinction coefficients. Time-resolved emission decay curves proved that the decreased ECL intensity was ascribed to the IFE-based steady quenching mechanism. With the support of tetracycline (TC) aptamer and the complementary DNA chain, the fabricated NIR ECL-IFE biosensor performed a wide linear range of 100 nM ∼ 10 fM with a low detection limit of 2.2 fM (S/N = 3), and it exhibited excellent stability, sensitivity, and reproducibility, so as to be applied to real samples. This strategy opens a new avenue to constructing an efficient NIR ECL-IFE system and shows excellent practical potential in actual sample analysis.