The key statute is 28 U.S. Code § 515 – Authority for legal proceedings; commission, oath, and salary for special attorneys:
(b) Each attorney specially retained under authority of the Department of Justice shall be commissioned as special assistant to the Attorney General or special attorney, and shall take the oath required by law. Foreign counsel employed in special cases are not required to take the oath. The Attorney General shall fix the annual salary of a special assistant or special attorney.
600.1 Grounds for appointing a Special Counsel.
The Attorney General, or in cases in which the Attorney General is recused, the Acting Attorney General, will appoint a Special Counsel when he or she determines that criminal investigation of a person or matter is warranted and –
(a) That investigation or prosecution of that person or matter by a United States Attorney’s Office or litigating Division of the Department of Justice would present a conflict of interest for the Department or other extraordinary circumstances; and
(b) That under the circumstances, it would be in the public interest to appoint an outside Special Counsel to assume responsibility for the matter.
600.3 Qualifications of the Special Counsel. An individual named as Special Counsel shall be a lawyer with a reputation for integrity and impartial decisionmaking, and with appropriate experience to ensure both that the investigation will be conducted ably, expeditiously and thoroughly, and that investigative and prosecutorial decisions will be supported by an informed understanding of the criminal law and Department of Justice policies. The Special Counsel shall be selected from outside the United States Government. Special Counsels shall agree that their responsibilities as Special Counsel shall take first precedence in their professional lives, and that it may be necessary to devote their full time to the investigation, depending on its complexity and the stage of the investigation.
(a)Original jurisdiction. The jurisdiction of a Special Counsel shall be established by the Attorney General. The Special Counsel will be provided with a specific factual statement of the matter to be investigated. The jurisdiction of a Special Counsel shall also include the authority to investigate and prosecute federal crimes committed in the course of, and with intent to interfere with, the Special Counsel’s investigation, such as perjury, obstruction of justice, destruction of evidence, and intimidation of witnesses; and to conduct appeals arising out of the matter being investigated and/or prosecuted.
(b)Additional jurisdiction. If in the course of his or her investigation the Special Counsel concludes that additional jurisdiction beyond that specified in his or her original jurisdiction is necessary in order to fully investigate and resolve the matters assigned, or to investigate new matters that come to light in the course of his or her investigation, he or she shall consult with the Attorney General, who will determine whether to include the additional matters within the Special Counsel’s jurisdiction or assign them elsewhere.
(c)Civil and administrative jurisdiction. If in the course of his or her investigation the Special Counsel determines that administrative remedies, civil sanctions or other governmental action outside the criminal justice system might be appropriate, he or she shall consult with the Attorney General with respect to the appropriate component to take any necessary action. A Special Counsel shall not have civil or administrative authority unless specifically granted such jurisdiction by the Attorney General.
The special counsel does not have a fixed term. Instead, the special counsel serves with a certain degree of job security. He or she does not serve at the pleasure of the President or the Attorney General. The Attorney General can fire the special prosecutor only for “good cause”:
600.10(d) The Special Counsel may be disciplined or removed from office only by the personal action of the Attorney General. The Attorney General may remove a Special Counsel for misconduct, dereliction of duty, incapacity, conflict of interest, or for other good cause, including violation of Departmental policies. The Attorney General shall inform the Special Counsel in writing of the specific reason for his or her removal.