The position was created in 1999 as the Minister for Justice, with the advent of devolution and the institution of the Scottish Parliament, taking over some of the roles and functions of the former Scottish Office Minister of State for Home Affairs that existed prior to 1999.
As with the UK Secretary of State for Justice, but unlike some other justice ministers, the Cabinet Secretary does not have any oversight of prosecutions - in Scotland these are handled by the Lord Advocate.