1678, 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,
We scarce could know they live, but that they bite."
[Dryden, "All for Love"]