Middle English, from Old English cwealm, cwelm (West Saxon) "death, murder, slaughter; disaster; widespread death by plague, pestilence or illness affecting humans or livestock; torment," utcualm (Anglian) "utter destruction," probably related to cwellan "to kill, murder, execute," cwelan "to die" (see quell).
The sense softened to "feeling of faintness" (1520s); the figurative meaning "uneasiness, doubt" is from 1550s; that of "a scruple of conscience" is from 1640s.
Evidence of a direct path from the Old English and Middle English senses (now obsolete) to the modern senses is wanting (OED 2nd edition has them as separate entries), and the old word seems to have become rare after c. 1400. But it is plausible, via the notion of "fit of sickness." The other suggested etymology, less satisfying, is to take the "fit of uneasiness" sense from Dutch kwalm "steam, vapor, mist" (cognate with German Qualm "smoke, vapor, stupor"), which also might be ultimately from the same Germanic root as quell.