Human beings universally express a concern for the fairness of social interactions, and it remains an open question that which ultimate factors led to the evolution of this preference. Here, we present a model accounting for the evolution of fairness on the basis of individual selection alone. We consider a simple social interaction based on the Dictator Game. Two individuals, a “proposer” and a “responder,” have an opportunity to split a resource. When they have no choice but to interact together, the most powerful (here the proposer) reaps all the profits and fairness cannot evolve. Partner choice is the key lever to overcome this difficulty. Rather than just two individuals, we consider a population composed of two classes of individuals (either proposers or responders), and we allow the responders to choose their partner. In such a “biological market,” fairness evolves as an “equilibrium price,” resulting from an ecological equivalent of the law of supply and demand. If a class is disadvantaged by the chosen resource partition (i.e., if it frequently receives less than half of the resource), it is outcompeted by the other one, and automatically becomes rarer. This rarity grants it an advantage on the market, which yields in turn to the evolution of a more favorable partition. Splitting the resource into two identical halves, or more generally in a way that equalizes the payoffs of the two classes, is then the only evolutionarily stable outcome. Beyond human fairness, this mechanism also opens up new ways of explaining the distribution of benefits in many mutualistic interactions.