Bail in criminal cases may be exonerated at any time before default upon their recognizance by surrendering their principal into court or to the jailer in the county where the principal is held to appear, or by such voluntary surrender by the principal himself, and in either event, in all cases where bank books, money or bonds are deposited by the surety, the court shall thereupon order the bank books, money or bonds so deposited to be returned to the surety or his order, and to be reassigned to the person entitled thereto. They shall deliver to the jailer their principal, with a certified copy of the recognizance, and he shall be received and detained by the jailer, but may again be bailed in the same manner as if committed for not finding sureties to recognize for him, provided that the surety making the surrender shall not be accepted as bail if the person surrendered shall again be bailed. The jailer shall forthwith notify the clerk or justice of the court where the proceeding is pending of such surrender.
Mass. Gen. Laws ch. 276, § 68