What is the role of the attorney general in the US? In 1870, Congress created the Department of Justice, making the Attorney General its head and consolidating various legal functions of the federal government under a single executive department.