The functions of cortical areas depend on their inputs and outputs, but the detailed circuits made by long-range projections are unknown. We show that the light-gated channel channelrhodopsin-2 (ChR2) is delivered to axons in pyramidal neurons in vivo. In brain slices from ChR2-expressing mice, photostimulation of ChR2-positive axons can be transduced reliably into single action potentials. Combining photostimulation with whole-cell recordings of synaptic currents makes it possible to map circuits between presynaptic neurons, defined by ChR2 expression, and postsynaptic neurons, defined by targeted patching. We applied this technique, ChR2-assisted circuit mapping (CRACM), to map long-range callosal projections from layer (L) 2/3 of the somatosensory cortex. L2/3 axons connect with neurons in L5, L2/3 and L6, but not L4, in both ipsilateral and contralateral cortex. In both hemispheres the L2/3-to-L5 projection is stronger than the L2/3-to-L2/3 projection. Our results suggest that laminar specificity may be identical for local and long-range cortical projections.