Nanotube-based water-purification devices have the potential to transform the field of desalination and demineralization through their ability to remove salts and heavy metals without significantly affecting the fast flow of water molecules. Boron nitride nanotubes have shown superior water flow properties compared to carbon nanotubes, and are thus expected to provide a more efficient water purification device. Using molecular dynamics simulations it is shown that a (5, 5) boron nitride nanotube embedded in a silicon nitride membrane can, in principle, obtain 100% salt rejection at concentrations as high as 1 M owing to a high energy barrier while still allowing water molecules to flow at a rate as high as 10.7 water molecules per nanosecond (or 0.9268 L m-2 h-1). Furthermore, ions continue to be rejected under the influence of high hydrostatic pressures up to 612 MPa. When the nanotube radius is increased to 4.14 Å the tube becomes cation-selective, and at 5.52 Å the tube becomes anion-selective.