The office of the Attorney General was established by the Judiciary Act of 1789 as a part-time job for one person, but grew with the bureaucracy. At one time, the Attorney General gave legal advice to the U.S. Congress as well as the President, but in 1819 the Attorney General began advising Congress alone to ensure a manageable workload. Until March 3, 1853, the salary of the Attorney General was set by statute at less than the amount paid to other Cabinet members. Early Attorneys General supplemented their salaries by running private law practices, often arguing cases before the courts as attorneys for paying litigants.
Following unsuccessful efforts (in 1830 and 1846) to make Attorney General a full-time job, in 1869, the U.S. House Committee on the Judiciary, led by Congressman William Lawrence, conducted an inquiry into the creation of a "law department" headed by the Attorney General and also composed of the various department solicitors and United States attorneys. On February 19, 1868, Lawrence introduced a bill in Congress to create the Department of Justice. President Ulysses S. Grant signed the bill into law on June 22, 1870.
Grant appointed Amos T. Akerman as Attorney General and Benjamin H. Bristow as America's first Solicitor General the same week that Congress created the Department of Justice. The Department's immediate function was to preserve civil rights. It set about fighting against domestic terrorist groups who had been using both violence and litigation to oppose the 13th, 14th and 15th Amendments to the Constitution.
Both Akerman and Bristow used the Department of Justice to vigorously prosecute Ku Klux Klan members in the early 1870s. In the first few years of Grant's first term in office there were 1000 indictments against Klan members with over 550 convictions from the Department of Justice. By 1871, there were 3000 indictments and 600 convictions with most only serving brief sentences while the ringleaders were imprisoned for up to five years in the federal penitentiary in Albany, New York. The result was a dramatic decrease in violence in the South. Akerman gave credit to Grant and told a friend that no one was "better" or "stronger" than Grant when it came to prosecuting terrorists. George H. Williams, who succeeded Akerman in December 1871, continued to prosecute the Klan throughout 1872 until the spring of 1873 during Grant's second term in office. Williams then placed a moratorium on Klan prosecutions partially because the Justice Department, inundated by cases involving the Klan, did not have the manpower to continue prosecutions.
The "Act to Establish the Department of Justice" drastically increased the Attorney General's responsibilities to include the supervision of all United States Attorneys, formerly under the Department of the Interior, the prosecution of all federal crimes, and the representation of the United States in all court actions, barring the use of private attorneys by the federal government. The law also created the office of Solicitor General to supervise and conduct government litigation in the Supreme Court of the United States.
With the passage of the Interstate Commerce Act in 1887, the federal government took on some law enforcement responsibilities, and the Department of Justice tasked with performing these.
In 1884, control of federal prisons was transferred to the new department, from the Department of Interior. New facilities were built, including the penitentiary at Leavenworth in 1895, and a facility for women located in West Virginia, at Alderson was established in 1924.
In 1933, President Franklin D. Roosevelt issued an executive order which gave the Department of Justice responsibility for the "functions of prosecuting in the courts of the United States claims and demands by, and offsenses [sic] against, the Government of the United States, and of defending claims and demands against the Government, and of supervising the work of United States attorneys, marshals, and clerks in connection therewith, now exercised by any agency or officer..."