Theory of mind (ToM) describes a child’s ability to accurately attribute mental states to themselves and others. ToM has been conceptualized as a protective factor against psychopathology across childhood. Little is known about potential moderators of this association. For example, it is unclear whether there are subgroups of children for whom well-developed ToM plays a stronger protective role for adaptive functioning compared to other children. In a community sample of 467 children, this study examined whether child temperament assessed at age 3 years moderates the association between ToM at age 3 years and internalizing and externalizing symptoms at age 5 years. We used a community detection approach to identify three distinct temperament groups: emotionally and behaviorally well-regulated (EBR), emotionally and behaviorally dysregulated (EBD), and introverted and overcontrolled (IOC). Results from moderated regression analyses suggest that social competence had a stronger protective role for the two temperament groups at elevated risk for emotional and behavioral problems, i.e., EBD and IOC. For the IOC group, greater ToM was associated with reduced externalizing symptoms. Results support the view that ToM, one aspect of social competence, may serve as a protective factor against the development of psychopathology, particularly among introverted and overcontrolled children.