The frequency of homoerotic behavior among individuals who do not identify as having an exclusively homosexual sexual orientation suggests that such behavior potentially has adaptive value. Here we define homoerotic behavior as intimate erotic contact between members of the same sex and affiliation as the motivation to make and maintain social bonds. Among both male and female nonhuman primates affiliation is one of the main drivers of homoerotic behavior.Correspondingly, in humans, both across cultures and across historical periods, homoerotic behavior appears to play a role in promoting social bonds. However, to date, the affiliation explanation of human homoerotic behavior has not been adequately tested experimentally. We developed a measure of homoerotic motivation with a sample of 244 men and women. Next, we found that, in women (n= 92), homoerotic motivation was positively associated with progesterone, a hormone that has been shown to promote affiliative bonding. Lastly, we explored the effects of affiliative contexts on homoerotic motivation in men (n=59), finding that men in an affiliative priming condition were more likely to endorse engaging in homoerotic behavior compared to those primed with neutral or sexual concepts, and this effect was more pronounced in men with high progesterone. These findings constitute the first experimental support for the affiliation account of the evolution of homoerotic motivation in humans.