This study constructs a two-stage game in which players endogenously choose their morality in the first stage, and then actions in the second stage. It regards morality as a function that converts each player’s actions into value judgments, and assumes that individuals prefer higher to lower value judgments. Players have an additional incentive for conducting actions related to their own and others’ moralities. Players choosing moralities have an incentive to assign high value judgments to actions that have a positive externality on themselves, their own preferred actions, or actions that others’ morality encourages. This study shows that the moral mechanism can be a handy tool in internalizing externalities. Allowing for moralities on others’ choice of moralities yields traditions, expanding the equilibrium action allocation. The moral mechanism has a natural tendency toward varying extents of nativism, such as family values, nationalism, etc. This model provides a method for quantifying morality, as well as scientific moral engineering.