Although the conditions favoring altruism are being increasingly understood, the evolutionary origins of the genetic basis for this behavior remain elusive. Here, we show that reproductive altruism (i.e., a sterile soma) in the multicellular green alga, Volvox carteri, evolved via the co-option of a life-history gene whose expression in the unicellular ancestor was conditioned on an environmental cue (as an adaptive strategy to enhance survival at an immediate cost to reproduction) through shifting its expression from a temporal (environmentally induced) into a spatial (developmental) context. The gene belongs to a diverged and structurally heterogeneous multigene family sharing a SAND-like domain (a DNA-binding module involved in gene transcription regulation). To our knowledge, this is the first example of a social gene specifically associated with reproductive altruism, whose origin can be traced back to a solitary ancestor. These findings complement recent proposals that the differentiation of sterile castes in social insects involved the co-option of regulatory networks that control sequential shifts between phases in the life cycle of solitary insects.