Bugger
Middle English (originally denoting a heretic, specifically an Albigensian): from Middle Dutch, from Old French bougre ‘heretic’, from medieval Latin Bulgarus ‘Bulgarian’, particularly one belonging to the Orthodox Church and therefore regarded as a heretic by the Roman Church. The sense ‘sodomite’ (16th century) arose from an association of heresy with forbidden sexual practices; its use as a general insult dates from the early 18th century.
wiktionary
From Middle English bougre(“heretic”), from Old French bougre, from Medieval Latin Bulgarus(“ Bulgar”), used in designation of heretics (especially the Bogomils, who arose around the 10th century AD in the First Bulgarian Empire), to whom various unnatural practices and perversions such as sodomy were ascribed. Ultimately from Proto-Turkic *bulgar(“disturber, disturbing”). Doublet of Bulgar.
From bug(noun) + -er.
etymonline
bugger (n.)
"sodomite," 1550s, earlier "heretic" (mid-14c.), from Medieval Latin Bulgarus "a Bulgarian" (see Bulgaria), so called from bigoted notions of the sex lives of Eastern Orthodox Christians or of the sect of heretics* that was prominent there 11c. Compare Old French bougre "Bulgarian," also "heretic; sodomite."
Softened secondary sense of "fellow, chap," is in British English "low language" [OED] from mid-19c. Meaning "something unpleasant, a nuisance" is from 1936. Related: Buggerly.
- The religious heretics in question were the Bogomils, whose name is a Slavic compound meaning "dear to God" (compare Russian bog "god") and might be a translation of Greek theophilos.
bugger (v.)
"to commit buggery with," 1590s, from bugger (n.). Meaning "ruin, spoil" is from 1923. Related: Buggered; buggering. Bugger off "go away" is from 1922, but the connection is obscure.