Gratitude is a typical social-moral emotion that plays a crucial role in maintaining human cooperative interpersonal relationship. Although neural correlates of gratitude have been investigated, the neurocognitive processes that lead to gratitude, namely, the representation and integration of its cognitive antecedents, remain largely unknown. Here, we combined fMRI and a human social interactive task to investigate how benefactor's cost and beneficiary's benefit, two critical antecedents of gratitude, are encoded and integrated in beneficiary's brain, and how the neural processing of gratitude is converted to reciprocity. A coplayer decided whether to help a human participant (either male or female) avoid pain at his/her own monetary cost; the participants could transfer monetary points to the benefactor with the knowledge that the benefactor was unaware of this transfer. By independently manipulating monetary cost and the degree of pain reduction, we could identify the neural signatures of benefactor's cost and recipient's benefit and examine how they were integrated. Recipient's self-benefit was encoded in reward-sensitive regions (e.g., ventral striatum), whereas benefactor-cost was encoded in regions associated with mentalizing (e.g., temporoparietal junction). Gratitude was represented in perigenual anterior cingulate cortex (pgACC), the strength of which correlated with trait gratitude. Dynamic causal modeling showed that the neural signals representing benefactor-cost and self-benefit passed to pgACC via effective connectivities, suggesting an integrative role of pgACC in generating gratitude. Moreover, gyral ACC plays an intermediary role in converting gratitude representation into reciprocal behaviors. Our findings provide a neural mechanistic account of gratitude and its role in social-moral life.SIGNIFICANCE STATEMENT Gratitude plays an integral role in subjective well-being and harmonious interpersonal relationships. However, the neurocognitive processes through which various components and antecedents of gratitude are integrated remain largely unknown. We developed a new interpersonal paradigm to independently and parametrically manipulate two antecedents of gratitude in a helping context, namely, the benefit to beneficiary and the cost to benefactor, to examine their representation and integration in the beneficiary's brain using fMRI. We found the neural encoding of self-benefit and benefactor-cost in reward- and mentalizing-related brain areas, respectively. More importantly, by examining effective connectivity, we showed that these componential signals are passed to perigenual anterior cingulate cortex, which tracks trial-by-trial gratitude levels. Our study thus provides a neural mechanistic account of gratitude.