Social conditions can alter the allocation of resources to reproductive traits. For example, an increase in social density during development is frequently associated with an increase in the testes mass of males. Sperm competition theory assumes that increased investment in testes should come at the expense of investing into precopulatory traits, such as sexually selected weaponry. However, much remains unknown about the role of the social context on the concurrent, relative investment in both testes and weapons. We found that the leaf‐footed cactus bug, Narnia femorata (Hemiptera: Coreidae), grew nearly 20% larger testes when raised in high social densities. In addition to manipulating social density, we used autotomy (limb loss) to limit investment in their hindlimb weapon during development. At low densities, we found that those that lost a weapon during development grew larger testes by adulthood, supporting previous work demonstrating a weapons–testes trade‐off. However, at high social densities, males that dropped a hindlimb did not grow larger testes, though testes were already large at this density. These results underscore the importance of the social context to resource allocation patterns within the individual.