In vivo optogenetics identifies brain circuits controlling behaviors in conscious animals by using light to alter neuronal function and offers a novel tool to study the brain-gut axis. Using adenoviral-mediated expression, we aimed to investigate whether photoactivation with channelrhodopsin (ChR2) or photoinhibition with halorhodopsin (HR3.0) of fibers originating from the central nucleus of the amygdala (CeA) at the bed nucleus of the stria terminalis (BNST) had any effect on colonic sensitivity. We also investigated whether there was any deleterious effect of the adenovirus on the neuronal population or the neuronal phenotype within the CeA-BNST circuitry activated during the optogenetic stimulation. In male rats, the CeA was infected with vectors expressing ChR2 or HR3.0 and fiber optic cannulae were implanted on the BNST. After 8-10 wk, the response to graded, isobaric colonic distension was measured with and without laser stimulation of CeA fibers at the BNST. Immunohistochemistry and histology were used to evaluate vector expression, neuronal integrity, and neurochemical phenotype. Photoactivation of CeA fibers at the BNST with ChR2 induced colonic hypersensitivity, whereas photoinhibition of CeA fibers at the BNST with HR3.0 had no effect on colonic sensitivity. Control groups treated with virus expressing reporter proteins showed no abnormalities in neuronal morphology, neuronal number, or neurochemical phenotype following laser stimulation. Our experimental findings reveal that optogenetic activation of discrete brain nuclei can be used to advance our understanding of complex visceral nociceptive circuitry in a freely moving rat model. NEW & NOTEWORTHY Our findings reveal that optogenetic technology can be employed as a tool to advance understanding of the brain-gut axis. Using adenoviral-mediated expression of opsins, which were activated by laser light and targeted by fiber optic cannulae, we examined central nociceptive circuits mediating visceral pain in a freely moving rat. Photoactivation of amygdala fibers in the stria terminalis with channelrhodopsin induced colonic hypersensitivity, whereas inhibition of the same fibers with halorhodopsin did not alter colonic sensitivity.