The basal forebrain (BF) is an anatomically and neurochemically complex structure that plays key roles in regulating various brain functions. Although BF is best known for cholinergic neurons that influence functional network dynamics and behaviors, non-cholinergic neurons are the dominant neuronal population in BF, and are found to contribute as well. However, it remains unclear how cholinergic and non-cholinergic BF neurons modulate large-scale functional networks and their relevance in intrinsic and extrinsic behaviors. With our optimized awake mouse optogenetic fMRI approach, we revealed optogenetic stimulations of four BF neuron types evoked distinct cell-type specific whole-brain BOLD activations, which could attribute to BF-originated low dimensional structural networks. Optogenetic activation of inhibitory (PV and SOM) or excitatory (VGLUT2 and ChAT) neurons in BF drove internally or externally oriented behavioral preference, respectively. Furthermore, we uncovered the functional network basis of the above BF-modulated behavioral preference, through a decoding model linking the BF-modulated BOLD activations, low dimensional structural networks, and behavioral preference. To summarize, we decoded a functional network basis of differential behavioral preference with cell-type specific optogenetic fMRI on BF, and provided an avenue for investigating mouse behaviors from a whole-brain view.