The geometric and electronic structures, binding interactions, electronic absorption spectra, and (hyper)polarizabilities of designed complexes M + @C18 in by M + endohedral C18 were studied by using (TD-)DFT method in this work. Due to the difference in radius, different M + ions complex with C18 at different positions in the ring. The binding interaction is found to be strongest for Li + @C18 in among the M + @C18 in with different alkali-metal ions. Atomic charge analysis shows that all M + in the complexes carry charge of almost +1.0 e, while the C18 moiety basically keeps neutral like its pristine status. The nature of the complexation mainly comes from induction term and/or the dispersion term, depending on the type of M + . Theoretical electronic spectra show that all complexes have the same optical absorption characteristics as the pristine C18, mainly because the electronic excitation of the complexes contributed almost solely by the redistribution of electrons within the C18 ring, which is demonstrated by both CTS and hole-electron analyses. Furthermore, it is found that the electron transition within C18 is exclusively from short C-C bonds to long C-C bonds. The studies of the NLO properties of the external field response of the M + @C18 in indicate that, under the action of incident light with specific frequency, there is no significant distinction in molecular polarizability and second hyperpolarizability of complexes with difference M + , while the first hyperpolarizability can be regulated by the species of doped alkali-metal ions. For all complexes M + @C18 in , the frequency-dependent (hyper)polarizabilities are substantially higher than those in the zero-frequency limit, and the higher the incident frequency, the greater the molecular (hyper)polarizability, indicating obvious resonance effect of the external field on molecular optical nonlinearity. Moreover, the analyses of the (hyper)polarizability densities and (hyper)polarizability tensors of the complexes reveal in depth the inherent characteristics of their optical nonlinearity.