Osmotic transport in nanoconfined aqueous electrolytes provides alternative venues for water desalination and “blue energy” harvesting. The osmotic response of nanofluidic systems is controlled by the interfacial structure of water and electrolyte solutions in the so-called electrical double layer (EDL), but a molecular-level picture of the EDL is to a large extent still lacking. Particularly, the role of the electronic structure has not been considered in the description of electrolyte/surface interactions. Here, we report enhanced sampling simulations based on ab initio molecular dynamics, aiming at unravelling the free energy of prototypical ions adsorbed at the aqueous graphene and hBN interfaces, and its consequences on nanofluidic osmotic transport. Specifically, we predicted the zeta potential, the diffusio-osmotic mobility, and the diffusio-osmotic conductivity for a wide range of salt concentrations from the ab initio water and ion spatial distributions through an analytical framework based on Stokes equation and a modified Poisson–Boltzmann equation. We observed concentration-dependent scaling laws, together with dramatic differences in osmotic transport between the two interfaces, including diffusio-osmotic flow and current reversal on hBN but not on graphene. We could rationalize the results for the three osmotic responses with a simple model based on characteristic length scales for ion and water adsorption at the surface, which are quite different on graphene and on hBN. Our work provides fundamental insights into the structure and osmotic transport of aqueous electrolytes on 2D materials and explores alternative pathways for efficient water desalination and osmotic energy conversion.