Salinity-gradient is emerging as one of the promising renewable energy sources but its energy conversion is severely limited by unsatisfactory performance of available semipermeable membranes. Recently, nanoconfined channels, as osmotic conduits, have shown superior energy conversion performance to conventional technologies. Here, ion selective nanochannels in lamellar Ti3C2Tx MXene membranes are reported for efficient osmotic power harvesting. These subnanometer channels in the Ti3C2Tx membranes enable cation-selective passage, assisted with tailored surface terminal groups, under salinity gradient. A record-high output power density of 21 W·m–2 at room temperature with an energy conversion efficiency of up to 40.6% is achieved by controlled surface charges at a 1000-fold salinity gradient. In addition, due to thermal regulation of surface charges and ionic mobility, the MXene membrane produces a large thermal enhancement at 331 K, yielding a power density of up to 54 W·m–2. The MXene lamellar structure, coupled with its scalability and chemical tunability, may be an important platform for high-performance osmotic power generators.