Ethnic discrimination is ubiquitous, and it has been shown to exert adverse effects on income redistribution. The reason is that a country’s ethnic majority, if richer than the average, may be unwilling to transfer resources to the country’s ethnic minorities if poorer than the average. A yet untested mechanism is that a country’s ethnic majority may reduce their work effort knowing that their income will finance redistribution to ethnic minorities. We test for this mechanism experimentally in triadic interactions. A German citizen acting as a worker is randomly matched with a recipient who can be another German, an economic migrant, or an asylum seeker in Germany. Workers know that another German citizen may transfer part of their earnings to the recipient. The recipient does not exert any work effort. Even if the recipient’s identity does not affect effort in the aggregate, social identity strongly moderates this relationship. Participants with a strong German identity, i.e., who report feeling close to other Germans, exert significantly less effort than other participants if the recipient is an asylum seeker. They also exert more effort when matched with a German recipient than an asylum seeker, while participants with a less strong German identity do the opposite. Moreover, participants with a strong German identity exert slightly more effort when matched with economic migrants than with asylum seekers, while others tend to do the opposite, albeit statistically insignificantly. Workers’ beliefs over the third party’s redistribution rate do not mediate such results and are generally inaccurate.