Recent experiments have demonstrated that highly charged ions can be guided through insulating nanocapillaries along the direction of the capillary axis for a surprisingly wide range of injection angles. Even more surprisingly, the transmitted particles remain predominantly in their initial charge state, thus opening the pathway to the construction of novel ion-optical elements without electric feedthroughs. We present a theoretical treatment of this self-organized guiding process.We develop a classical trajectory transport theory that relates the microscopic charge-up with macroscopic material properties. Transmission coefficients, angular spread of transmitted particles, and discharge characteristics of the target are investigated. Partial agreement with experiment is found.