The right temporoparietal junction (rTPJ) is a core hub in neural networks associated with reorienting of attention and social cognition. However, it remains unknown whether participants can learn to actively modulate their rTPJ activity via neurofeedback. Here, we explored the feasibility of functional near-infrared spectroscopy (fNIRS)-based neurofeedback in modulating rTPJ activity and its effect on rTPJ functions such as reorienting of attention and visual perspective taking. In a bidirectional regulation control group design, 50 healthy participants were either reinforced to up- or downregulate rTPJ activation over four days of training. Both groups showed a spontaneous increase in rTPJ activity (upregulation effect), but only the upregulation group maintained this effect, while the downregulation group showed a decline from the initial rTPJ activation. This suggests a successful upregulation in the upregulation group and a learning effect in the downregulation group only. We found a significant group x time interaction effect in the performance of the reorienting of attention task and group-specific changes, with decreased reaction times (RTs) in the upregulation group and increased RTs in the downregulation group across all conditions after neurofeedback training. Those with low baseline performance showed greater improvements. In the perspective-taking task, however, only time effects were observed that were non-group-specific. These findings demonstrate that fNIRS-based neurofeedback is a feasible method to modulate rTPJ functions with evidence of neurophysiologically specific effects, thus paving the way for future applications of non-invasive rTPJ modulation in neuropsychiatric disorders.