Several studies suggest a negative impact of ethnic diversity on cooperation, but most of them rely on attitudinal and other indirect measurements of cooperation or are derived from the artificial laboratory setting. We conducted a field experiment based on the lost-letter technique across 52 neighborhoods in Berlin, Germany. The study has two aims. First, we investigate whether the negative effect of ethnic heterogeneity on cooperation holds for concrete cooperative behavior in a real-world setting. Second, we test the most prominent psychological mechanism that has been proposed to explain the negative effects of heterogeneity on cooperation, namely in-group favoritism. We do so by experimentally varying the ethnicity and religion of the senders of letters. We find strong support for the negative effect of ethnic diversity on cooperation. We find no evidence, however, of in-group favoritism. Letters from Turkish or Muslim organizations were as often returned as those from German and Christian organizations, and the ethnic diversity effect was the same for all types of letters.