1670s, originally "a would-be wit whose abilities are mediocre;" sense of "simpleton" (one lacking all his wits) is first attested 1755.
Half-wits are fleas; so little and so light,Phrase out of half wit "half out of one's mind" was in Middle English (late 14c.). Half-witted "lacking common sense" is from 1640s.
We scarce could know they live, but that they bite.
[Dryden, "All for Love"]
A foolish person: half-wits in the phys ed class (1755+)