Congress officially established the U.S. Department of Justice on July 1, 1870. The congressional act, entitled The Act to Establish the Department of Justice, officially created the DOJ as an executive department of the U.S. government, headed by the office of Attorney General.
Prior to the Civil War, the U.S. government utilized the services of private attorneys to handle its litigation. However, after the Civil War, the increasing amount of litigation involving the federal government made this practice too expensive. Because of this, Congress decided to establish the Department of Justice to handle the legal business of the federal government.