Lithium ion batteries (LIBs) are the most important energy storage devices. Novel methods for directly characterizing the behavior of Li ions during battery operations are highly coveted for understanding the fundamental working principles of the batteries and improving their device performances. In this study, we developed a novel method to visualize the change in Li ion distribution in the electrodes of all-solid-state (ASS) LIBs based on the time-of-flight secondary ion mass spectrometry technique with an in situ electrical measurement system. We succeeded in directly visualizing the decrease/increase of Li concentration in the cathode composite electrode during the charging/discharging cycles. Our method paves the way to characterize the fundamental aspects of ASS LIBs for improving device performance, including the evaluation of Li-depleted regions, visualization of the conductive paths and analysis of the causes of device degradation.