c. 1300, purgen, "clear of a charge or suspicion," from Anglo-French purger, Old French purgier "wash, clean; refine, purify" morally or physically (12c., Modern French purger) and directly from Latin purgare "cleanse, make clean; purify," especially in reference to the body, "free from what is superfluous; remove, clear away," but also figuratively "refute, justify, vindicate," from Old Latin purigare, from purus "pure" (see pure) + root of agere "to set in motion, drive; to do, perform" (from PIE root *ag- "to drive, draw out or forth, move").
By mid-14c. as "to cleanse (a person or soul) from sin or moral defilement; to cleanse, clear, purify" (metal, etc.), also medicinally "to cleanse the body or digestive tract by a laxative, diuretic, or emetic." The figurative sense of "make ideal or pure, rid of objectionable elements or members" is by 1580s. Related: Purged; purging. The Latin verb is also the source of Spanish purgar, Italian purgare.
1560s, "that which purges," from purge (v.). Meaning "a purgative, an act of purging" is from 1590s. Political or social sense of "removal (from a governing body, party, army, etc.) of persons deemed undesirable" is by 1730 (in reference to Pride's Purge); modern use in reference to the Soviet Union is by 1933. The earliest sense of the word in English was "examination or interrogation in a legal court" (mid-15c.), a sense now obsolete even if the feeling persists.