The evolution of sociality represented a major transition point in biological history. The most advanced societies, such as those displayed by social insects, consist of reproductive and nonreproductive castes. The caste system fundamentally affects the way natural selection operates. Specifically, selection acts directly on reproductive castes, such as queens, but only indirectly through the process of kin selection on nonreproductive castes, such as workers. In this study, we present theoretical analyses to determine the rate of substitution at loci expressed exclusively in the queen or worker castes. We show that the rate of substitution is the same for queen- and worker-selected loci when the queen is singly mated. In contrast, when a queen is multiply mated, queen-selected loci show higher rates of substitution for adaptive alleles and lower rates of substitution for deleterious alleles than worker-selected loci. We compare our theoretical expectations to previously obtained genomic data from the honeybee, Apis mellifera, where queens mate multiply and the fire ant, Solenopsis invicta, where queens mate singly and find that rates of evolution of queen- and worker-selected loci are consistent with our predictions. Overall, our research tests theoretical expectations using empirically obtained genomic data to better understand the evolution of advanced societies.