The ability to control neural activity is essential for research not only in basic neuroscience, as spatiotemporal control of activity is a fundamental experimental tool, but also in clinical neurology for therapeutic brain interventions. Transcranial-magnetic, ultrasound, and alternating/direct current (AC/DC) stimulation are some available means of spatiotemporal controlled neuromodulation. There is also light-mediated control, such as optogenetics, which has revolutionized neuroscience research, yet its clinical translation is hampered by the need for gene manipulation. As a drug-based light-mediated control, the effect of a photoswitchable muscarinic agonist (Phthalimide-Azo-Iper (PAI)) on a brain network is evaluated in this study. First, the conditions to manipulate M2 muscarinic receptors with light in the experimental setup are determined. Next, physiological synchronous emergent cortical activity consisting of slow oscillations-as in slow wave sleep-is transformed into a higher frequency pattern in the cerebral cortex, both in vitro and in vivo, as a consequence of PAI activation with light. These results open the way to study cholinergic neuromodulation and to control spatiotemporal patterns of activity in different brain states, their transitions, and their links to cognition and behavior. The approach can be applied to different organisms and does not require genetic manipulation, which would make it translational to humans.