Human beings have a sophisticated ability to reason about the minds of others, often referred to as using one's theory of mind or mentalizing. Just like any other cognitive ability, people engage in reasoning about other minds when it seems useful for achieving particular goals, but this ability remains disengaged otherwise. We suggest that understanding the factors that engage our ability to reason about the minds of others helps to explain anthropomorphism: cases in which people attribute minds to a wide range of nonhuman agents, including animals, mechanical and technological objects, and supernatural entities such as God. We suggest that engagement is guided by two basic motivations: (1) the motivation to explain and predict others' actions, and (2) the motivation to connect socially with others. When present, these motivational forces can lead people to attribute minds to almost any agent. When absent, the likelihood of attributing a mind to others, even other human beings, decreases. We suggest that understanding the factors that engage our theory of mind can help to explain the inverse process of dehumanization, and also why people might be indifferent to other people even when connecting to them would improve their momentary wellbeing.