She was released on grounds of insanity.

Literal

She [topic-は] sane not-is [reason-という理由で] was-released.

正気でない means 'not sane' — 正気 (しょうき) means 'sanity' or 'sound mind.' という理由で means 'for the reason that' or 'on the grounds of' — という quotes the reason, and 理由で marks it as the cause. 釈放する (しゃくほうする) means 'to release' (from custody). This is a legal/formal context sentence.