The legal school of thought called "natural law" holds that the law is an outgrowth of morality. Therefore, natural law "began" at the same time morality "began," which would be whenever human civilization started (or earlier, if you believe morality comes from God or is eternal).