When we judge an action as morally right or wrong, we rely on our capacity to infer the actor's mental states (e.g., beliefs, intentions). Here, we test the hypothesis that the right temporoparietal junction (RTPJ), an area involved in mental state reasoning, is necessary for making moral judgments. In two experiments, we used transcranial magnetic stimulation (TMS) to disrupt neural activity in the RTPJ transiently before moral judgment (experiment 1, offline stimulation) and during moral judgment (experiment 2, online stimulation). In both experiments, TMS to the RTPJ led participants to rely less on the actor's mental states. A particularly striking effect occurred for attempted harms (e.g., actors who intended but failed to do harm): Relative to TMS to a control site, TMS to the RTPJ caused participants to judge attempted harms as less morally forbidden and more morally permissible. Thus, interfering with activity in the RTPJ disrupts the capacity to use mental states in moral judgment, especially in the case of attempted harms.