Two-dimensional (2D) nanosheets are promising electrode materials for electrochemical desalination by capacitive deionization (CDI). Like most 2D nanosheets, the delicate design of MXene-based materials can achieve state-of-the-art desalination capacities, but the intrinsic low ion diffusion characteristic of 2D nanosheets limits the desalination rate. To address this problem, we synthesize a new-family of nitrogen-doped three-dimensional (3D) nanofibrous architectures from MXenes (denoted as N-TNF) via direct alkalization and subsequent nitrogenization of common MXene stacks. N-TNF has a unique nanofiber structure and plentiful nitrogen dopants, resulting in expanded interlayer spacing, high specific surface area and excellent electrochemical activity. As a result, the N-TNF shows an ultrahigh mean desalination rate of 5.6 mg g−1 min−1, along with superior desalination capacity of 44.8 mg g−1, as well as good long-term cycling stability, which is comparable to state-of-the-art MXene electrodes and better than most 2D materials. This work demonstrates the fabrication of MXene-derived 3D materials, and provides a new approach to overcome the limits of 2D nanosheets for efficient CDI.