SAN FRANCISCO — A state agency has launched a formal investigation of a former California state judge over allegations including that he steered business to a firm where his son worked, improperly accepted gifts and used his office to advance his candidacy for attorney general.

The Commission on Judicial Performance announced on Wednesday that it would hold a hearing to help it determine whether to discipline Steven Bailey, who served as a judge in El Dorado County from 2009 through the end of August 2017. The hearing comes after a preliminary review by the commission.

A spokesman for Bailey’s campaign, Corey Uhden, said there is no misconduct to find, and the proceedings would be a waste of time and taxpayer money.

The commission was “dominated by liberal appointees,” and the hearing was “simply an attempt to disparage a respected former Superior Court Judge and take a shot at the only candidate for Attorney General with an extensive background in criminal law,” Uhden said.

Bailey is running for attorney general as a Republican. The commission could decide to publicly admonish him, but its findings would not disqualify him from the attorney general’s race. Bailey will have the opportunity to present evidence and cross-examine witnesses at the commission hearing.

Bailey is accused of repeatedly ordering defendants to use an electronic monitoring service without disclosing that his son worked at the company providing it.

In 2009, Bailey ordered a defendant to pay $140 in restitution after a letter signed by the judge’s son said the man owed that amount for electronic monitoring, according to charges against Bailey in a notice of formal proceedings filed by the commission.

Bailey is accused of accepting hundreds of dollars in gifts between 2009 and 2012, including nearly $350 from a Placerville attorney. The judge in 2011 appointed the same attorney to oversee a case at the rate of $350 an hour to be paid by the defendant, according to the charges.

Bailey is also accused of using his judicial position to raise funds and promote his candidacy for attorney general in violation of ethics rules and showing bias by telling a fellow judge in response to a compliment about a shirt that he got it from a “gay guy” and “gays really know how to dress,” according to the charges.