We developed a method that uses Channelrhodopsin-2 (ChR2) for transcranial optogenetic stimulation. This method is based on scanning a light beam over the brain, thereby photostimulating ChR2-expressing neurons in intact mice. As a proof of principle, we applied this technique to the motor cortex of transgenic mice expressing ChR2 in cortical pyramidal cells. Photostimulation induced limb movements that were time-locked with millisecond precision and could be induced at frequencies up to 20 Hz. By scanning this light beam, we could map the distribution of neurons associated with limb movement. With this approach we could simultaneously define motor maps controlling two limbs and could reproducibly generate such cortical motor maps over periods of weeks. This method allows non-invasive mapping of brain circuitry in living animals and could help define the connection between behavior and brain circuitry.