Sharia law was formulated by the followers of Prophet Mohammed after his passing, by his friends collectively, from verses in the Koran as well as references to his ideology and teachings to his colleagues or people around him. It was formulated as guidance to how everything should be judged.
On October 25th, 2011. See this statement in context.