Research has established that children with high levels of early behavioral inhibition (BI) – a subdued, timid, fearful response to novel or mildly challenging stimuli or events – are at an elevated risk for social anxiety in later childhood and adolescence. Yet, substantial heterogeneity has been documented in those developmental trajectories; consequently, understanding factors that moderate children’s paths from early BI to social anxiety is an important goal. We proposed that the association between children’s BI at toddler age and social anxiety at early school age is (a) mediated by their BI at preschool age, and (b) moderated by the level of social understanding, or Theory of Mind (ToM). In 102 typically developing community children, we observed BI in the laboratory at age 2 and 4.5 in “Risk Room” paradigms and assessed ToM at age 4.5 and 5.5 using false belief tasks. Mothers and fathers rated children’s social anxiety symptoms at age 6.5. We supported the proposed moderated mediation model, with the path from BI at age 2 to BI at age 4.5 to social anxiety at age 6.5 unfolding only for children whose ToM abilities were relatively low, but not for those whose ToM abilities were relatively high. Results also supported a curvilinear relation between ToM and social anxiety, which highlights the risk of elevated social anxiety for children with extremely low ToM abilities. Taken together, proficiency in mindreading may help inhibited children navigate social environments and thus reduce risks for social anxiety.