Maryland Code, COURTS AND JUDICIAL PROCEEDINGS 1-203
(b) Prior to qualification for judicial office, a judge may agree with his former law firm, or his successor in practice, that the judge may receive over a reasonable period of time one or more payments representing the reasonable liquidated value of his interest in his former practice as of the date of the termination of practice. The agreement shall be in writing and a copy shall be filed with the secretary of the Maryland Judicial Conference. In determining reasonable liquidated value, the judge’s interest in contingent fees with respect to matters then pending in his law office may be taken into account.
(c) While he is receiving payments under this section, a judge may not hear a case in which a partner or employee of his former firm or successor in interest is an attorney of record.