Doping alkali metal atoms, especially lithium (Li), in nanocarbon materials has always been considered to be one of the most effective methods to improve the optical properties of the system. In this theoretical work, we doped a Li atom to the recently observed all-carboatomic molecule, cyclo[18]carbon (C18), and finally obtained two stable configurations with Li inside and outside the ring. The calculation results show that the energy barrier of transition between the two [email protected]18 configurations is low, so the conversion is easy to occur at ambient temperature. Further study reveals that the state of [email protected]18 complex, namely its dominant configuration, can be switched by applying a proper external electric field (EEF). The electronic structure, absorption spectrum, and optical nonlinearity of the two configurations are found to be significantly different, which indicates that the optical properties of the [email protected]18 complex can be effectively regulated by switching the location of doped Li atom between inside and outside the carbon ring. With the help of various wavefunction analysis methods, the nature of the discrepancies in the properties of [email protected]18 complex with different configurations was deeply revealed. The relevant results are expected to provide theoretical guidance for development of cyclocarbon-based optical molecular switches.