Traditionally, neuroscientists have defined the identity of neurons by the cells' location, morphology, connectivity and excitability. However, the direct relationship between these parameters and the molecular phenotypes has remained largely unexplored. Here, we present a method for obtaining full transcriptome data from single neocortical pyramidal cells and interneurons after whole-cell patch-clamp recordings in mouse brain slices. In our approach, termed Patch-seq, a patch-clamp stimulus protocol is followed by the aspiration of the entire somatic compartment into the recording pipette, reverse transcription of RNA including addition of unique molecular identifiers, cDNA amplification, Illumina library preparation and sequencing. We show that Patch-seq reveals a close link between electrophysiological characteristics, responses to acute chemical challenges and RNA expression of neurotransmitter receptors and channels. Moreover, it distinguishes neuronal subpopulations that correspond to both well-established and, to our knowledge, hitherto undescribed neuronal subtypes. Our findings demonstrate the ability of Patch-seq to precisely map neuronal subtypes and predict their network contributions in the brain.