Responding to a stimulus requires transforming an internal sensory representation into an internal motor representation. Where and how this sensory-motor transformation occurs is a matter of vigorous debate. Here, we trained male and female mice in a whisker detection go/no-go task in which they learned to respond (lick) following a transient whisker deflection. Using single unit recordings, we quantified sensory-related, motor-related, and choice-related activities in whisker primary somatosensory cortex (S1), whisker region of primary motor cortex (wMC), and anterior lateral motor cortex (ALM), three regions that have been proposed to be critical for the sensory-motor transformation in whisker detection. We observed strong sensory encoding in S1 and wMC, with enhanced encoding in wMC, and a lack of sensory encoding in ALM. We observed strong motor encoding in all three regions, yet largest in wMC and ALM. We observed the earliest choice probability in wMC, despite earliest sensory responses in S1. Based on the criteria of having both strong sensory and motor representations and early choice probability, we identify whisker motor cortex as the cortical region most directly related to the sensory-motor transformation. Our data support a model of sensory encoding originating in S1, sensory amplification and sensory-motor transformation occurring within wMC, and motor signals emerging in ALM after the sensory-motor transformation.