As a two-dimensional material, MXene has accordion-like structures and possesses highly tunable and tailorable electro-optical capabilities, which suggests that it can be extensively used for electro-photonics devices. Here, we investigate the performances of 2D Ti 3 C 2 T x MXene in the nonlinear optical application of ultrafast photonics spanning the near-infrared (NIR) and mid-infrared (MIR) ranges. Interestingly, by utilizing the combined effects of nonlinear saturable absorption and high nonlinearity properties of the Ti 3 C 2 T x photonic device based on a microfiber, rogue waves with a high pulse energy in a fiber laser at 1.55 μm are first obtained. Additionally, by virtue of the Ti 3 C 2 T x saturable absorber, high-power ultrashort pulses are generated in a 2 μm fiber laser. Besides, a Ti 3 C 2 T x Q-switched fiber laser at 2.8 μm is also realized, which can deliver stable pulse trains with a 640 ns pulse width and a 122.9 kHz repetition rate, corresponding to a 1.8 μJ pulse energy and a 2.89 W peak power. The results suggest that as a promising nonlinear optical material, MXene has pioneered a way for the development of ultrafast nonlinear photonic devices in the NIR and MIR ranges.