Channelrhodopsins (ChRs) are light-gated cation channels derived from algae that have shown experimental utility in optogenetics; for example, neurons expressing ChRs can be optically controlled with high temporal precision within systems as complex as freely moving mammals. Although ChRs have been broadly applied to neuroscience research, little is known about the molecular mechanisms by which these unusual and powerful proteins operate. Here we present the crystal structure of a ChR (a C1C2 chimaera between ChR1 and ChR2 from Chlamydomonas reinhardtii) at 2.3 Å resolution. The structure reveals the essential molecular architecture of ChRs, including the retinal-binding pocket and cation conduction pathway. This integration of structural and electrophysiological analyses provides insight into the molecular basis for the remarkable function of ChRs, and paves the way for the precise and principled design of ChR variants with novel properties.