c. 1300, affliccioun, "misery, sorrow, pain, distress" (originally especially "self-inflicted pain, self-mortification, religious asceticism"), from Old French afliction "act of humility, humiliation, mortification, punishment" (11c.) and directly from Latin afflictionem (nominative afflictio), noun of action from past-participle stem of affligere "to dash down, overthrow," from ad "to" (see ad-) + fligere (past participle flictus) "to strike" (seeafflict). Meaning "a cause of constant pain or sorrow" is from 1590s.
"I know, O Lord [says the Psalmist] that thy judgments are right, and that thou in faithfulness hast afflicted me;" the furnace of affliction being meant but to refine us from our earthly drossiness, and soften us for the impression of God’s own stamp and image. [Robert Boyle, "Seraphic Love," 1663]