Prosocial behaviors play a pivotal role in the functioning of human societies, influencing critical domains such as healthcare, education, taxation, and welfare. Despite the ubiquitous existence of norms that prescribe prosocial actions, individuals do not consistently adhere to them, sometimes exhibiting selfish behavior influenced by various situational factors and individual preferences. While societal interventions to promote prosociality would therefore be beneficial, we lack a deep understanding of the factors that drive prosocial actions and their variability across different contexts necessary to the design of these interventions. Here we present an experimental and computational approach that can identify the normative and individual motives behind prosocial versus selfish choices, and that can characterize how individual prosocial actions vary in response to changing normative environments. Using a series of experiments in which participants either report their perception of prosocial norms or choose between prosocial and selfish actions, we first show that while most individuals agree on what behaviors are deemed normatively (in)appropriate, prosocial behavior varies strongly across people. We disentangle the conflicting motives underlying the perception of prosocial norms and prosocial decisions with computational decision models. Our analysis identifies four types of individuals whose choices reflect different motives, and who respond in a different manner to changing normative environments. Our approach helps us better understand the origins of heterogeneity in prosocial behaviors and may have implications for policy making and the design of behavioral interventions.