 The Ten Commandments are recognized as a moral foundation by Judaism , Christianity , and Islam . They first appear in the Book of Exodus , according to which Moses , acting under the orders of God , freed the Israelites from physical slavery in Egypt . According to Church teaching , God offered a covenant — which included the Ten Commandments — to also free them from the " spiritual slavery " of sin . Some historians have described this as " the central event in the history of ancient Israel " . 
