In the USA, he is the head of the U.S. Department of Justice and a member of the U.S. President's cabinet.
This chief executive office dates to the Middle Ages but did not assume its modern form until the 16th century. In the U.S., the position dates to the Judiciary Act of 1789. Head of the Department of Justice and a member of the cabinet, the attorney general oversees all the government's law business and acts as the president's legal adviser. Every U.S. state also has an attorney general. 
The title Attorney - General of England was first used in 1461.