In clinical practice, determining programmed death-ligand 1 (PD-L1) expression is crucial for selecting patients and monitoring immune checkpoint blockade therapies. Currently, PD-L1 expression is quantified using immunohistochemistry (IHC). However, IHC-based methods do not capture the heterogeneous and dynamic nature of PD-L1 expression. Thus, there is a pressing need for a rapid and efficient method for monitoring PD-L1 expression both in vitro and in vivo, which would considerably aid in prognosis and treatment selection. In this study, we present for the first time an activatable near-infrared (NIR) fluorescence imaging probe (Q-Atezol) for the real-time monitoring of PD-L1 expression in vitro and in vivo. The ability of Q-Atezol to detect PD-L1 expression quickly and in real-time was evaluated in both tumor spheroid and lung cancer xenograft models. An always-on optical probe (ON-Atezol) was synthesized and tested for comparison. In vivo NIR fluorescence imaging studies were conducted on A549 and H1975 tumor-bearing mice, and their tumor-to-background ratios (TBRs) were analyzed. The quenched NIR fluorescence of Q-Atezol is activated upon binding to PD-L1 proteins on the surface of cancer cells, thereby enabling PD-L1 detection in the three-dimensional (3D) tumor spheroids without a washing step. Notably, PD-L1-positive H1975 tumors were clearly visualized with a high TBR 6 hours after Q-Atezol injection, whereas ON-Atezol treatment could not detect H1975 tumors even 24 hours post-injection. The activatable fluorescence probe Q-Atezol demonstrated great potential as an exceptional sensor for assessing PD-L1 expression in 3D cell structures and for in vivo applications.