In nature, cooperation among individuals is often accompanied by competition among the same individuals for the cooperatively produced rewards. In such a situation, the evolution of cooperative and competitive investments influences each other, but previous theoretical studies mostly focused on either cooperation or competition. Here we consider a generic situation in which individuals cooperatively produce rewards according to the continuous snowdrift game, and then rewards are divided among cooperating individuals according to a generalized tug-of-war game. Using adaptive dynamics and numerical simulations, we investigated the joint evolution of two continuous traits, the investment in cooperation and in competition, respectively. We found that competition for the division of rewards promotes evolutionary branching, and hence polymorphism in both the cooperative and the competitive traits. In polymorphic populations, cooperation levels are positively correlated with competition levels among strains, so that cooperators tend to benefit disproportionately from the benefits produced. We also found that the mean cooperation level within the population is promoted by the competition. Our results show that coevolution of cooperation and competition has qualitatively different outcomes compared to the evolution of only cooperation or only competition, and suggest that it is important to simultaneously consider multiple aspects of social interactions. (C) 2019 Elsevier Ltd. All rights reserved.