Sodium and potassium ion batteries hold promise for next-generation energy storage systems due to their rich abundance and low cost, but are facing great challenges in optimum electrode materials for actual applications. Here, ultrathin nanoribbons of sodium titanate (M-NTO, NaTi1.5O8.3) and potassium titanate (M-KTO, K2Ti4O9) were successfully synthesized by simultaneous oxidation and alkalization process of Ti3C2 MXene. Benefiting from the suitable interlayer spacing (0.90 nm for M-NTO, 0.93nm for M-KTO), ultrathin thickness (<11 nm), narrow widths of nanoribbons (<60 nm), and open macroporous nanostructures for enhanced ion insertion/extraction kinetics, the resulting m-nto exhibited a large reversible capacity of 191 mah g-1 at 200 ma g-1 for sodium storage, higher than those of pristine ti3c2 (178 mah g-1) and commercial tic derivatives (86 mah g-1). notably, m-kto displayed superior reversible capacity of 151 mah g-1 at 50 ma g-1, 88 mah g-1 at a high rate of 300 ma g-1, and long-term stable cyclability over 900 times, which outperform other ti-based layered materials reported to date. moreover, this strategy is facial and highly flexible, and can be extended for preparing a large number of mxene derived materials, from 60+ group of max phases, for various applications such as supercapacitors, batteries, and electrocatalysis.