A fundamental organizing principle of the striatum is the striosome/matrix system that is defined by inputs/outputs and neurochemical markers. The thalamostriatal projection is highly heterogeneous originating in many subnuclei of the thalamus including the midline (ML) and intralaminar (IL) nuclei. We examined the dendritic morphology and axonal trajectory of 15 ML and 11 IL neurons by single-neuron labeling with viral vectors in combination with mu-opioid receptor immunostaining in rat brains. Dendritic and axonal morphology defined ML neurons as type II cells consisting of at least two subclasses according to the presence or absence of striatal axon collaterals. In the striatum, ML neurons preferentially innervated striosomes, whereas parafascicular neurons preferentially innervated the matrix. Almost all single thalamostriatal neurons favoring striosome or matrix compartments also innervated the cerebral cortical areas that supplied cortical input to the same striatal compartment. We thus revealed that thalamostriatal projections are highly organized 1) by the similarity in morphological characteristics and 2) their preference for the striatal compartments and cortical areas. These findings demonstrate that the functional properties of striatal compartments are influenced by both their cortical and thalamic afferents presumably with a different time latency and support selective dynamics for the striosome and matrix compartments.