The Declaration of Independence was a document mainly written by Thomas Jefferson. John Locke was an English philosopher that came up with the basis of a legitimate government, and this heavily influenced Jefferson while he was writing the Declaration.