Human self-consciousness relies on the ability to distinguish between oneself and others. We sought to explore the neural correlates involved in self-other representations by investigating two critical processes: perspective taking and agency. Although recent research has shed light on the neural processes underlying these phenomena, little is known about how they overlap or interact at the neural level. In a two-factorial functional magnetic resonance imaging (fMRI) experiment, participants played a ball-tossing game with two virtual characters (“avatars”). During an active/agency (ACT) task, subjects threw a ball to one of the avatars by pressing a button. During a passive/nonagency (PAS) task, they indicated which of the other avatars threw the ball. Both tasks were performed from a first-person perspective (1PP), in which subjects interacted from their own perspective, and a third-person perspective (3PP), in which subjects interacted from the perspective of an avatar with another location in space. fMRI analyses revealed overlapping activity in medial prefrontal regions associated with representations of one's own perspective and actions (1PP and ACT), and overlapping activity in temporal-occipital, premotor, and inferior frontal, as well as posterior parietal regions associated with representation of others' perspectives and actions (3PP and PAS). These findings provide evidence for distinct neural substrates underlying representations of the self and others and provide support for the idea that the medial prefrontal cortex crucially contributes to a neural basis of the self. The lack of a statistically significant interaction suggests that perspective taking and agency represent independent constituents of self-consciousness.