The performance of perovskite solar cells and photodetectors strongly depends on the carrier extraction in the electron transport layer/perovskite interface and the film quality of the perovskite layer. Ti3C2Tx MXene quantum dots, which exhibit both good conductivity of MXene materials and size-dependent tunable optoelectronic properties of quantum dots, were synthesized to form electrostatic self-assembly nanoparticles and further introduced into perovskite optoelectronic devices. The carrier extraction in electron transport layer/perovskite interface was significantly improved, and the defect density of the modified perovskite layer was effectively reduced. These improvements ultimately lead to a remarkable power conversion efficiency of perovskite solar cells increasing from 16.57 % to 23.47 %, and the photodetectors achieve responsivity approaching 35.54 mA W−1 and response speed of 154 ms (rise time) and 120 ms (decay time). Meanwhile, the long-time humidity, thermal and light stress stability of the devices were largely boosted, which originated from the better crystallization and suppressed degradation of the perovskite films.