We developed a technique for performing whole-cell patch-clamp recordings from genetically identified neurons in behaving Drosophila. We focused on the properties of visual interneurons during tethered flight, but this technique generalizes to different cell types and behaviors. We found that the peak-to-peak responses of a class of visual motion-processing interneurons, the vertical-system visual neurons (VS cells), doubled when flies were flying compared with when they were at rest. Thus, the gain of the VS cells is not fixed, but is instead behaviorally flexible and changes with locomotor state. Using voltage clamp, we found that the passive membrane resistance of VS cells was reduced during flight, suggesting that the elevated gain was a result of increased synaptic drive from upstream motion-sensitive inputs. The ability to perform patch-clamp recordings in behaving Drosophila promises to help unify the understanding of behavior at the gene, cell and circuit levels.