We use a stepwise pulling protocol in molecular dynamics simulations to identify how a G-quadruplex selects and conducts Na+, K+, and NH4+ ions. By estimating the minimum free-energy changes of the ions along the central channel via Jarzynski's equality, we find that the G-quadruplex selectively binds the ionic species in the following order: K+ > Na+ > NH4+. This order implies that K+ optimally fits the channel. However, the features of the free-energy profiles indicate that the channel conducts Na + best. These findings are in fair agreement with experiments on G-quadruplexes and reveal a profoundly different behavior from the prototype potassium-ion channel KcsA, which selects and conducts the same ionic species. We further show that the channel can also conduct a single file of water molecules and deform to leak water molecules. We propose a range for the conductance of the G-quadruplex.