Precise assessment of wakefulness states during sevoflurane anesthesia and timely arousal are of paramount importance to refine the control of anesthesia. To tackle this issue, a bidirectional implantable microelectrode array (MEA) is designed with the capability to detect electrophysiological signal and perform in situ deep brain stimulation (DBS) within the dorsomedial hypothalamus (DMH) of mice. The MEA, modified with platinum nanoparticles/IrOx nanocomposites, exhibits exceptional characteristics, featuring low impedance, minimal phase delay, substantial charge storage capacity, high double-layer capacitance, and longer in vivo lifetime, thereby enhancing the sensitivity of spike firing detection and electrical stimulation (ES) effectiveness. Using this MEA, sevoflurane-inhibited neurons and sevoflurane-excited neurons, together with changes in the oscillation characteristics of the local field potential within the DMH, are revealed as indicative markers of arousal states. During the arousal period, varying-frequency ESs are applied to the DMH, eliciting distinct arousal effects. Through in situ detection and stimulation, the disparity between these outcomes can be attributed to the influence of DBS on different neurons. These advancements may further our understanding of neural circuits and their potential applications in clinical contexts.