Government in Locke's society would not be legitimate without the power of the people. The government's main job is to serve and protect the people in society. Morality is based off of following natural law, which is a fundamental duty in Locke's society. The society would not exist if it were not for this. One of the significant differences Hobbes states is, men have the freedom and liberty to do what as they wish, but "within the bounds of the law of nature" (Locke, 451). This shows the main difference between Hobbes and Locke. The basis of morality in natural law and duty. .
To continue on about the differences between their views, Hobbes holds a completely different stance. Hobbes says morality does not exist in society until the making of a social contract. Therefore, humans have no objective morality and humans don't have basic moral principles because of their natural state. Hobbes believes one must fully submit themselves in return for all basic necessities needed in a society, like laws and power to enforce those laws. Morality is created at the time when this social contract is created because it comes with the understanding that before this contract, humans are in a state of war. The end goal of surrendering the certain rights in the social contract is peace. Hobbes believes that the government is the ultimate power and the force in the society, and they exist to regulate the conducts of citizens in the society. Hobbes believes that the natural state of human society would be for everybody to exist together without legitimate authority in a free for all society. This would leave each individual in utter fear and pandemonium throughout. .
The basis for Hobbes morality in his state of nature is that one can do whatever they want in order to ensure their individual happiness. Each individual has the liberty to do whatever he or she please without taking away the rights of other members in the society.