Hierarchy provides a unifying principle for the macroscale organization of anatomical and functional properties across primate cortex, yet microscale bases of specialization across human cortex are poorly understood. Anatomical hierarchy is conventionally informed by invasive tract-tracing measurements, creating a need for a principled proxy measure in humans. Moreover, cortex exhibits marked interareal variation in gene expression, yet organizing principles of cortical transcription remain unclear. We hypothesized that specialization of cortical microcircuitry involves hierarchical gradients of gene expression. We found that a noninvasive neuroimaging measure—MRI-derived T1-weighted/T2-weighted (T1w/T2w) mapping—reliably indexes anatomical hierarchy, and it captures the dominant pattern of transcriptional variation across human cortex. We found hierarchical gradients in expression profiles of genes related to microcircuit function, consistent with monkey microanatomy, and implicated in neuropsychiatric disorders. Our findings identify a hierarchical axis linking cortical transcription and anatomy, along which gradients of microscale properties may contribute to the macroscale specialization of cortical function. Burt et al. analyze patterns of gene expression across human cortex and show expression primarily varies along a sensory-association hierarchy captured by noninvasive neuroimaging, suggesting an organizing principle for microcircuit specialization.