"This paper addresses how the social identity and social tie affect the pro-social behavior and in-group favoritism among prison inmates. We conduct a field experiment in a typical Chinese jail and introduce a real-effort charitable contribution scheme into the inmates' ordinary workplace. The amount of charity is tied to the inmates' output. The main treatment variable is the social closeness of the beneficiary with the inmates including both group identity and social tie dimensions. During the five-day experiment, inmates exhibit substantial pro-social behavior: the average output raises by 4.06—11.87%. There is also evidence of in-group favoritism in that the output increases more when the beneficiary carries the prisoner identity. The additional social tie on top of prisoner identity also has positive effect on inmates' pro-social behaviors though mostly insignificant. We also investigate the effect of incarceration. When helping an “outsider”, incarceration length has no effects on inmates' pro-social behavior. However, when the beneficiary is tied to the prisoner identity, the inmates with long incarceration spells have significantly less output increases than those with short incarceration spells, indicating that the incarceration length weakens the inmates' in-group favoritism. We suggest that the competitive culture among inmates in the prison explain this negative effect.