What determines human beings' decisions to donate money to a charity? Using a nationally representative survey of the Japanese population, we demonstrate that having been taught by a female teacher in their first year of school makes individuals more likely to donate to charities following natural disasters. The findings are robust in controlling for lessons on prosocial behaviors, such as group learning. We tested our results separately for men and women, as well as on prosocial attitude outcomes. Overall, our results suggest potential prosocial implications may arise from teacher-student gender matching.