Maryland Estates and Trusts Section 2-109
§ 2-109.
  (a)   Except as provided in subsection (b) of this section, a judge of the court may not act as an attorney at law in a civil or criminal matter during a term of office.
  (b)   This section does not apply:
    (1)   In Harford County;
    (2)   In Montgomery County;
    (3)   In Baltimore City, to a judge of the Court while practicing law before any court of the State except an orphans' court; or
    (4)   In Prince George's County, Baltimore County, Calvert County, and Howard County, to a judge of the Court while practicing law in connection with a case that is:
      (i)   Outside the jurisdiction of orphans' court; and
      (ii)   Unrelated to the administration of an estate or guardianship.