As post-lithium ion batteries, both sodium ion batteries (SIBs) and potassium ion batteries (PIBs) possess great potential for large scale energy storage. However, the improvements of both SIBs and PIBs for practical applications are facing great challenges in the development of high-performance electrode materials. Here, we demonstrate the fabrication of alkalized Ti3C2 (a-Ti3C2) MXene nanoribbons attained by continuous shaking treatment of pristine Ti3C2 MXene in aqueous KOH solution. Benefited from the expanded interlayer spacing of a-Ti3C2, narrow widths of nanoribbons as well as three-dimensional interconnected porous frameworks for enhanced ion reaction kinetics and improved structure stability, the resulting a-Ti3C2 anodes showed excellent sodium/potassium storage performance, for example, high reversible capacities of 168 and 136mAhg−1 at 20mAg−1 and 84 and 78mAhg−1 at 200mAg−1 were obtained for SIBs and PIBs, respectively. Notably, a-Ti3C2 possessed outstanding long-term cyclability at high current density of 200mAg−1, delivering a capacity of ~ 50mAhg−1 for SIBs and ~ 42mAhg−1 for PIBs after 500 cycles, which outperformed most of reported MXene based anodes for SIBs and PIBs. Moreover, this alkalization strategy could be extended as a universal approach for fabricating various alkalized MXene-based frameworks derived from a large family of MAX phases for numerous applications, such as catalysis, energy storage and conversion.