Meaning "to close by folding or bringing together" is from mid-14c. Meaning "prevent ingress and egress" is from mid-14c. Sense of "to set (someone) free (from)" (c.1500) is obsolete except in dialectal phrases such as to get shut of. To shut (one's) mouth "desist from speaking" is recorded from mid-14c.

shut-in

n.

"person confined from normal social intercourse," 1904, from the verbal phrase, from shut (v.) + in (adv.).