"put to work at certain duties, compel to work for one's benefit," 1806, from British public school slang fag (n.) "junior student who does certain duties for a senior" (1785), from fag (v.1). Related: Fagdom (1902); faggery "fatiguing labor" (1853). Brain-fag (1850) was an old term for "mental fatigue."
"male homosexual," 1914, American English slang, probably from earlier contemptuous term for "woman" (1590s), especially an old and unpleasant one, in reference to faggot (n.1) "bundle of sticks," as something awkward that has to be carried (compare baggage "worthless woman," 1590s). It may also be reinforced by Yiddish faygele "homosexual" (n.), literally "little bird." It also may have roots in British public school slang noun fag "a junior who does certain duties for a senior" (1785), with suggestions of "catamite," from fag (v.). This also spun off a verb (see fag (v.2).
He [the prefect] used to fag me to blow the chapel organ for him. ["Boy's Own Paper," Aug. 3, 1889]
Other obsolete British senses of faggot were "man hired into military service merely to fill out the ranks at muster" (1700) and "vote manufactured for party purposes" (1817).
The explanation that male homosexuals were called faggots because they were burned at the stake as punishment is an etymological urban legend. Burning sometimes was a punishment meted out to homosexuals in Christian Europe (on the suggestion of the Biblical fate of Sodom and Gomorrah), but in England, where parliament had made homosexuality a capital offense in 1533, hanging was the method prescribed. Use of faggot in connection with public executions had long been obscure English historical trivia by the time the word began to be used for "male homosexual" in 20th century American slang, whereas the contemptuous slang word for "woman" (in common with the other possible sources or influences listed here) was in active use early 20c., by D.H. Lawrence and James Joyce, among others.