New models of fluid transport are expected to emerge from the confinement of liquids at the nanoscale, with potential applications in ultrafiltration, desalination and energy conversion. Nevertheless, advancing our fundamental understanding of fluid transport on the smallest scales requires mass and ion dynamics to be ultimately characterized across an individual channel to avoid averaging over many pores. A major challenge for nanofluidics thus lies in building distinct and well-controlled nanochannels, amenable to the systematic exploration of their properties. Here we describe the fabrication and use of a hierarchical nanofluidic device made of a boron nitride nanotube that pierces an ultrathin membrane and connects two fluid reservoirs. Such a transmembrane geometry allows the detailed study of fluidic transport through a single nanotube under diverse forces, including electric fields, pressure drops and chemical gradients. Using this device, we discover very large, osmotically induced electric currents generated by salinity gradients, exceeding by two orders of magnitude their pressure-driven counterpart. We show that this result originates in the anomalously high surface charge carried by the nanotube's internal surface in water at large pH, which we independently quantify in conductance measurements. The nano-assembly route using nanostructures as building blocks opens the way to studying fluid, ionic and molecule transport on the nanoscale, and may lead to biomimetic functionalities. Our results furthermore suggest that boron nitride nanotubes could be used as membranes for osmotic power harvesting under salinity gradients.