Channelrhodopsin-2 (ChR2) is a light-gated, cation-selective ion channel isolated from the green algae Chlamydomonas reinhardtii. Here, we report the generation of transgenic mice that express a ChR2-YFP fusion protein in the CNS for in vivo activation and mapping of neural circuits. Using focal illumination of the cerebral cortex and olfactory bulb, we demonstrate a highly reproducible, light-dependent activation of neurons and precise control of firing frequency in vivo. To test the feasibility of mapping neural circuits, we exploited the circuitry formed between the olfactory bulb and the piriform cortex in anesthetized mice. In the olfactory bulb, individual mitral cells fired action potentials in response to light, and their firing rate was not influenced by costimulated glomeruli. However, in piriform cortex, the activity of target neurons increased as larger areas of the bulb were illuminated to recruit additional glomeruli. These results support a model of olfactory processing that is dependent upon mitral cell convergence and integration onto cortical cells. More broadly, these findings demonstrate a system for precise manipulation of neural activity in the intact mammalian brain with light and illustrate the use of ChR2 mice in exploring functional connectivity of complex neural circuits in vivo.