"one who bears testimony to faith," especially "one who willingly suffers death rather than surrender his or her religious faith," specifically "one of the Christians who in former times were put to death because they would not renounce their beliefs," late Old English martyr, from Late Latin martyr, (source also of Old French martir, Spanish martir, Italian martire, etc.), from Doric Greek martyr, earlier martys (genitive martyros), in Christian use "martyr," literally "witness."
This Greek word is sometimes said to be related to mermera "care, trouble," from mermairein "be anxious or thoughtful," from PIE *(s)mrtu- (source also of Sanskrit smarati "remember," Latin memor "mindful"), however Beekes has phonetic objections to this and suggests it is rather a loan-word from Pre-Greek. For sense shift from abstract "testimony" to "a witness," compare French témoin "witness" from Latin testimonium; English witness (n.) "one who testifies," originally "testimony."
The word was adopted directly into most Germanic languages (Old Saxon, Old Frisian martir, Old High German martyr, etc.), but Norse used a native formation pislarvattr, literally "torture-witness." Meaning "one who suffers death or grievous loss in defense or on behalf of any belief or cause" (love, etc.) is from late 14c. General sense of "constant sufferer, a victim of misfortune, calamity, disease, etc.," is from 1550s. Martyr complex "exaggerated desire for self-sacrifice" is attested by 1916.
"put to death as punishment for adherence to some religious belief (especially Christianity)," Middle English martiren, from Old French martiriier and in part from Old English gemartyrian, from martyr (n.). Middle English also had a verb martyrize (mid-15c.).