The aim of the present study was to investigate the neural bases of cooperative behaviors and social self-perception underlying the execution of joint actions by using a hyperscanning brain paradigm with functional near-infrared spectroscopy (fNIRS). We firstly found that an artificial positive feedback on the cognitive performance was able to affect the self-perception of social position and hierarchy (higher social ranking) for the dyad, as well as the cognitive performance (decreased error rate, ER, and response times, RTs). In addition, the shared cognitive strategy was concurrently improved within the dyad after this social reinforcing. Secondly, fNIRS measures revealed an increased brain activity in the postfeedback condition for the dyad. Moreover, an interbrain similarity was found for the dyads during the task, with higher coherent prefrontal cortex (PFC) activity for the interagents in the postfeedback condition. Finally, a significant prefrontal brain lateralization effect was revealed, with the left hemisphere being more engaged during the postfeedback condition. To summarize, the self-perception, the cognitive performance, and the shared brain activity were all reinforced by the social feedback within the dyad.