Long-range neuronal circuits play an important role in motor and sensory information processing. Determining direct synaptic inputs of excited and inhibited neurons is important for understanding the circuit mechanisms involved in regulating movement. Here, we used the monosynaptic rabies tracing technique, combined with fluorescent micro-optical sectional tomography, to characterize the brain-wide input to the motor cortex (MC). The whole brain dataset showed that the main excited and inhibited neurons in the MC received inputs from similar brain regions with a quantitative difference. With 3D reconstruction we found that the distribution of input neurons, that target the primary and secondary MC, had different patterns. In the cortex, the neurons projecting to the primary MC mainly distributed in the lateral and anterior portion, while those to the secondary MC distributed in the medial and posterior portion. The input neurons in the subcortical areas also showed the topographic shift model, as in the thalamus, the neurons distributed as outer and inner shells while the neurons in the claustrum and amygdala were in the ventral and dorsal part, respectively. These results lay the anatomical foundation to understanding the organized pattern of motor circuits and the functional differences between the primary and secondary MC.