"Two Treatises on Government" was published anonymously in 1689 shortly after the Glorious Revolution which disposed King James II. The book served two purposes. It was designed not only to challenge common notions, but to introduce people to a broader thinking on governmental rule.
The first treatise is a counter argument to Sir Robert Filmer. Filmer argued the right of the monarchy was secured through Adam, the first man. The argument revolves heavily around religious tones. Filmer believed God gave Adam domain over every living thing and such domain was inherited by his family. Thus the monarchy had a directive from God to reign over all people. This was the foundation of the monarchy. Locke vehemently denied such an argument and provided several counter points to it.
The second treatise is an explanation on how government should work and where it truly receives its ability to rule the people. The central theme of this part of the work revolved around Thomas Hobbes' state of nature, whereby no man in his natural state could govern another without agreement or force. Areas covered included slavery, property rights, and the right to revolution should the burden of government grow too great. This part of the work was designed to educate and inspire the masses about what Locke perceived as their God given rights as people.