In his book "The Longest Struggle: Animal Advocacy from Pythagoras to Peta", Norm Phelps speaking about origins of animal protection refers to the times of Maurya Empire under Ashoka rules in 3rd century BCE, where it had mainly religious reasons. In his empire, not only hunting was banned, but also slaughter and eating of cattle, together with restrictions regarding fishing and fish-eating.
Norm Phelps describes it as "one of the very few instances in world history of a government treating its animals as citizens who are as deserving of its protection as the human residents".
According to "Hunting and hunters in medieval Aragonese legislation" in Roman times, hunting was considered a natural right of humans and could be freely practiced.
The medieval thinking about hunting started in 5th century with increasing activity of Germans and feudal society. With time, the reason for prohibition of hunting became the property issues, as large areas of forests belonged to the crown of particular countries and through them, to their vassals, what led to hunting monopoly of upper classes and licensed hunters.
E.g. in England it changed in 11th century, in the times of William the Conqueror, when Norman law replaced the earlier Anglo-Saxon one (in which the rights to forests were shared among all the people). Deer hunting restrictions, famous thanks to all the stories about Robin Hood, were set up by king William in 1079.
What about hunting restrictions connected with animal preservation? I can only write that the beginning of 11th century, king of Poland, Boleslaw Chrobry banned the hunting of beavers at his land, as they were close to extinction.