Cooperative behaviors exist along a spectrum of cost, from no-risk scenarios of mutual benefit to self-sacrificing altruism. Hamilton’s rule predicts that as risk increases, cooperative decisions should become increasingly kin-biased (nepotistic). To manipulate the perceived risks of regurgitated food sharing in captive vampire bats, we created a novel “rescue” condition, which required that donors leave their preferred roosting location, descend to an illuminated spot on the cage floor, and regurgitate food across cage bars to a trapped hungry bat. Vampire bats adapted their food sharing to this novel context, but with a dramatic reduction in the probability and amount of food sharing. Sixteen of 29 bats were fed by groupmates when trapped. All 15 starved bats that were tested in both trapped and free conditions received less food when trapped. Donations to trapped bats came from kin and nonkin, but subjects received a greater proportion of their food from closer relatives when trapped than when free. This finding supports the prediction that nepotistic biases should be exaggerated under dangerous conditions.