The gift exchange represents a moment that characterizes interpersonal interactions. In particular, research in psychological and neuroscientific fields aimed to observe the social function of gift exchange. Specifically, the present study aimed to investigate the effects of prosocial behavior, experienced during gift exchange, on individuals’ cognitive performance and brain activity. To this aim, behavioral performance and neural activity of 15 dyads of participants, with a consolidated friendship, were collected during the execution of an attentional cooperative task before or after a gift exchange. Individuals’ brain activity was recorded through the use of Functional Near Infrared Spectroscopy (fNIRS) in hyperscanning. Results showed an increase of perceived cooperation and cognitive performance, in terms of accuracy (ACC), after gift exchange. The increase of interpersonal tuning and cooperation was also shown by neural activity with an increase of oxygenated hemoglobin (O2Hb) intra-brain and inter-brain connectivity in the dorsolateral prefrontal cortex (DLPFC) following the gift exchange. Moreover, from ConIndex analysis emerged an increase of inter-brain connectivity compared to intra-brain in DLPFC area. The present study, therefore, highlights how prosocial behavior can have positive effects on cognitive performance improvement and interpersonal relationships and neural coordination strengthen, increasing intra and inter-brain connectivity mechanisms.