The selective rate of specific ion transport across nanoporous material is critical to biological and nanofluidic systems. Molecular sieves for ions can be achieved by steric and electrical effects. However, the radii of Na+ and K+ are quite similar; they both carry a positive charge, making them difficult to separate. Biological ionic channels contain precisely arranged arrays of amino acids that can efficiently recognize and guide the passage of K+ or Na+ across the cell membrane. However, the design of inorganic channels with novel recognition mechanisms that control the ionic selectivity remains a challenge. We present here a design for a controllable ion-selective nanopore (molecular sieve) based on a single-walled carbon nanotube with specially arranged carbonyl oxygen atoms modified inside the nanopore, which was inspired by the structure of potassium channels in membrane spanning proteins (e.g., KcsA). Our molecular dynamics simulations show that the remarkable selectivity is attributed to the hydration structure of Na+ or K+ confined in the nanochannels, which can be precisely tuned by different patterns of the carbonyl oxygen atoms. The results also suggest that a confined environment plays a dominant role in the selectivity process. These studies provide a better understanding of the mechanism of ionic selectivity in the KcsA channel and possible technical applications in nanotechnology and biotechnology, including serving as a laboratoryin-nanotube for special chemical interactions and as a high-efficiency nanodevice for purification or desalination of sea and brackish water. This work has been recently published on J. Am. Chem. Soc.（2010, 132, 1873）.This work was partly supported by the National Natural Science Foundation of China (grant no. 10904106) and China Postdoctoral Science Foundation (grant no. 20090450160).