The basal forebrain (BF) plays crucial roles in arousal, attention, and memory, and its impairment is associated with a variety of cognitive deficits. The BF consists of cholinergic, GABAergic, and glutamatergic neurons. Electrical or optogenetic stimulation of BF cholinergic neurons enhances cortical processing and behavioral performance, but the natural activity of these cells during behavior is only beginning to be characterized. Even less is known about GABAergic and glutamatergic neurons. Here, we performed microendoscopic calcium imaging of BF neurons as mice engaged in spontaneous behaviors in their home cages (innate) or performed a go/no-go auditory discrimination task (learned). Cholinergic neurons were consistently excited during movement, including running and licking, but GABAergic and glutamatergic neurons exhibited diverse responses. All cell types were activated by overt punishment, either inside or outside of the discrimination task. These findings reveal functional similarities and distinctions between BF cell types during both spontaneous and task-related behaviors.