Insomnia and anxiety are two common and closely related clinical problems that pose a threat to individuals' physical and mental well-being. There is a possibility that some nuclei and neural circuits in the brain are shared by both insomnia and anxiety. In the present study, using a combination of chemogenetics, optogenetics, polysomnographic recordings and the classic tests of anxiety-like behaviors, we verified that the calmodulin-dependent protein kinase II alpha (CaMKIIa) neurons of the ventromedial hypothalamus (VMH) are involved in the regulation of both wakefulness and anxiety. Chemogenetic manipulation of the VMH CaMKIIa neurons elicited an apparent increase in wakefulness during activation, whereas inhibition decreased wakefulness mildly. It substantiated that the VMH CaMKIIa neurons contribute to wakefulness. Then in millisecond-scale control of neuronal activity, short-term and long-term optogenetic activation induced the initiation and maintenance of wakefulness, respectively. We also observed that mice reduced exploratory behaviors in classic anxiety tests while activating the VMH CaMKIIa neurons and were anxiolytic while inhibiting. Additionally, photostimulation of the VMH CaMKIIa axons in the paraventricular hypothalamus (PVH) mediated wakefulness and triggered anxiety-like behaviors as well. In conclusion, our results demonstrate that the VMH participates in the control of wakefulness and anxiety, and offer a neurological explanation for insomnia and anxiety, which may be valuable for therapeutic interventions such as medication and transcranial magnetic stimulation.