In the present work, the three stable MXenes M n+1 C n O2 (M = Nb,Ta) are explored based on first-principles calculations. These materials are important derivatives of 2D materials and exhibit distinctive properties, holding vast potential in nanodevices. All these M n+1 C n O2 (M = Nb,Ta) materials exhibit outstanding superconducting performance, with corresponding superconducting transition temperatures of 23.00 K, 25.00 K, and 29.00 K. Analysis reveals that the high superconducting transition temperatures of MXenes M n+1 C n O2 (M = Nb,Ta) are closely associated with the high value of the logarithmic average of phonon frequencies, ωlog , and the strong electron–phonon coupling, attributed to the crucial contribution of low-frequency phonons. Additionally, we applied strain treatments of 2% and 4% to M n+1 C n O2 (M = Nb,Ta), resulting in varying changes in superconducting transition temperatures under different strains.