The attorney general shall appear as counsel for the state in all causes pending in the supreme court of appeals, or in any federal court, in which the state is interested; he shall appear in any cause in which the state is interested that is pending in any other court in the state, on the written request of the governor, and when such appearance is entered he shall take charge of and have control of such cause; he shall defend all actions and proceedings against any state officer in his official capacity in any of the courts of this state or any of the federal courts when the state is not interested in such cause against such officer, but should the state be interested against such officer, he shall appear for the state; he shall institute and prosecute all civil actions and proceedings in favor of or for the use of the state which may be necessary in the execution of the official duties of any state officer, board or commission on the written request of such officer, board or commission; he shall, when requested by the prosecuting attorney of a county wherein a state institution of correction is located, provide attorneys for appointment as special prosecuting attorneys to assist the prosecuting attorney of said county in the prosecution of criminal proceedings when, in the opinion of the circuit judge of said county, or a justice of the West Virginia supreme court of appeals, extraordinary circumstances exist at said institution which render the financial resources of the office of the prosecuting attorney inadequate to prosecute said cases; he may consult with and advise the several prosecuting attorneys in matters relating to the official duties of their office, and may require a written report from them of the state and condition of the several causes, in which the state is a party, pending in the courts of their respective counties; he may require the several prosecuting attorneys to perform, within the respective counties in which they are elected, any of the legal duties required to be performed by the attorney general which are not inconsistent with the duties of the prosecuting attorneys as the legal representatives of their respective counties; when the performance of any such duties by the prosecuting attorney conflicts with his duties as the legal representative of his county, or for any reason any prosecuting attorney is disqualified from performing such duties, the attorney general may require the prosecuting attorney of any other county to perform such duties in any county other than that in which such prosecuting attorney is elected and for the performance of which duties outside of the county in which he is elected the prosecuting attorney shall be paid his actual traveling and other expenses out of the appropriation for contingent expenses for the department for which such services are rendered; the attorney general shall keep in proper books, a register of all causes prosecuted or defended by him in behalf of the state or its officers and of the proceedings had in relation thereto, and deliver the same to his successor in office; and he shall preserve in his office all his official opinions and publish the same in his biennial report.
Upon request of any member of the West Virginia national guard who has been named defendant in any civil action arising out of that guardsman's action while under orders from the governor relating to national guard assistance in disasters and civil disorders, the attorney general shall appear as counsel for and represent such guardsman.
W. Va. Code § 5-3-2