Molecular dynamics simulations of ion distribution in a nanochannel were performed using a three region simulation domain including two bulk regions on each side of the nanochannel. This scheme allows the study of ion concentration and distribution inside the nanochannel under a given bulk electrolyte concentration, i.e. when the molecular system reaches equilibrium, the concentrations of the counter- and co-ions inside the nanochannel corresponding to a bulk electrolyte will emerge naturally. Our approach is in sharp contrast to the common practice in modeling electric double layers where the number of ions in the nanochannel is assigned somewhat arbitrarily, corresponding to an unknown bulk concentration.