Nitric oxide (NO) is an important signaling molecule overexpressed in many diseases, thus the development of NO-activatable probes is of vital significance for monitoring related diseases. However, sensitive photoacoustic (PA) probes for detecting NO-associated complicated diseases (e.g., encephalitis), has yet to be developed. Herein, we report a NO-activated PA probe for in vivo detection of encephalitis by tuning the molecular geometry and energy transformation processes. A strong donor-acceptor structure with good conjugation can be obtained after NO treatment, along with the active intramolecular motion, significantly boosting “turn-on” near-infrared PA property. The molecular probe exhibits high specificity and sensitivity towards NO over interfering reactive species. Noninvasive in vivo imaging indicates that PA signal lights up in lipopolysaccharide-induced encephalitis with a high signal-to-background ratio of 15.7. Further studies reveal that the probe is also capable of differentiating encephalitis in different severities, being beneficial for understanding the disease evolution processes and drug screening. This work will inspire more insights into the development of high-performing NO-activated PA probes for advanced diagnosis by making full use of intramolecular motion and energy transformation processes.