Md. Code, Crim. Proc. § 3-110

Current with effective changes from the 2024 legislative session, chs. 2-121
Section 3-110 - Not criminally responsible - Plea and verdict
(a)
(1) If a defendant intends to rely on a plea of not criminally responsible, the defendant or defense counsel shall file a written plea alleging, in substance, that when the alleged crime was committed, the defendant was not criminally responsible by reason of insanity under the test for criminal responsibility in § 3-109 of this title.
(2) A written plea of not criminally responsible by reason of insanity shall be filed at the time provided for initial pleading, unless, for good cause shown, the court allows the plea to be filed later.
(b) The defendant has the burden to establish, by a preponderance of the evidence, the defense of not criminally responsible.
(c) If the trier of fact finds that the State has proved beyond a reasonable doubt that the defendant committed the criminal act charged, then, if the defendant has pleaded not criminally responsible, the trier of fact separately shall find whether the defendant has established, by a preponderance of the evidence, that the defendant was at the time criminally responsible or not criminally responsible by reason of insanity under the test for criminal responsibility in § 3-109 of this title.
(d) A court may not enter a verdict of not criminally responsible unless the defendant or defense counsel has filed a written plea under subsection (a) of this section.

Md. Code, CP § 3-110