Once upon a time, the English population was decimated by the plague. The King was so concerned about the shrinking number of his subjects that he ordered his people to reproduce. His proclamation, "Fornicate Under Command of the King"--"F.U.C.K" for short--was the source of our favorite swearword.
Unfortunately this story isn't true, nor is pretty much any etymology of a swearword that involves an acronym. Shit cannot be blamed on cargoes of manure exploding in the middle of the Atlantic (Ship High in Transit), while the British word naff cannot be attributed to "not available for fucking." (Why naff needed an acronym is puzzling. It originated as a word in the 1960s gay slang language Polari--isn't that interesting enough?) The two great exceptions are snafu (situation normal: all fucked up) and fubar (fucked up beyond all recognition), which grew out of the military's RFA (rage for acronyms) in World War II.
Fuck isn't an Anglo-Saxon word either. Some of today's swearwords did indeed originate in Old English, including shit, arse, turd, and the British bollocks. The f-word is of Germanic origin, related to Dutch, German, and Swedish words for "to strike" and "to move back and forth." It first appears, though, only in the 16th century, in a manuscript of the Latin orator Cicero. An anonymous monk was reading through the monastery copy of De Officiis (a guide to moral conduct) when he felt compelled to express his anger at his abbot. "O d fuckin Abbot," he scrawled in the margin of the text. We can be sure when this was because he helpfully recorded the date in another comment--1528. It is difficult to know whether the annotator intended "fucking" to mean "having sex," as in "that guy is doing too much fucking for someone who is supposed to be celibate," or whether he used it as an intensifier, to convey his extreme dismay; if the latter, it anticipates the first recorded use by more than three hundred years. Either is possible, really--John Burton, the abbot in question, was a man of questionable monastic morals. It is interesting as well that while the annotator has no problem spelling out "fucking" (except for the g), he refuses to write out a word that is most likely damned. To this monk, damnation is the real obscenity, the one that can be hinted at but not expressed in full.
There are at least two instances of fuck dated before that of our monk, but scholars sometimes deny them the glory of first use because one is Scottish and one appears in code, with a Latin verb conjugation. The Scots poet William Dunbar, himself a former Franciscan friar, penned these lines (translated here into modern English) sometime before his death, in 1513:
He embraced tight, he kissed and groped,
As if he were overcome with desire.
Yet it seemed from his behavior he would have fucked [fukkit].
The coded example is also from a poem, dated 1475-1500, this one attacking the Carmelite friars of the town of Ely. It is macaronic, that is, written partly in English and partly in Latin, with the dirty bits "concealed" in the most basic of ciphers:
Non sunt in cœli, quia gxddbov xxkxzt pg ifmk. ...Fratres cum knyvys goth about and txxkxzv nfookt xxzxkt.
For each letter of code, you simply substitute the previous letter of the alphabet. From the first line, making allowances for late medieval spelling, the decoding gets you "fuccant wivys of heli." So the first line comes out in modern translation, "They [the monks] are not in heaven, because they fuck the wives of Ely." The second bit of code unciphers to "swivyt mennis wyvis," with the whole line reading "Brothers with knives go about and swive men's wives." Swive was a direct word for copulation in the Middle Ages, familiar to readers of Chaucer. To this author, it was apparently as bad a word as its synonym, also requiring at least the pretence of concealment. It is unclear whether the words are censored because swive and fuck are thought to be obscene, worse in themselves than the other words in the poem, or because the sexual sins of which the author accuses the monks are so horrible they cannot be stated outright. What is clear is that you didn't want to mess with any Carmelite friar looking for oppljf.
Fuck appears to have hit its stride by the late 16th century. In 1598, John Florio published an Italian-English dictionary intended to teach people these languages as they were really spoken. Florio's dictionary is thus full of fucks. He defines the Italian fottere as "to jape, to sard, to fuck, to swive, to occupy," for example, while fottitrice is "a woman fucker, swiver, ... etc." and fottitore the male equivalent.
But while the f-word was common in the period, it was not a swearword. It was simply a direct and increasingly impolite word for sexual intercourse. Only in the early to mid-nineteenth century did it begin to be used non-literally, as most swearwords are, to insult and offend others, to relieve pain, and to express extremes of emotion, negative and positive. In other words, it took roughly three hundred years to make the transition from "he fucked her" to "that's fucking awesome!"
Melissa Mohr is the author of Holy Sh*t: A Brief History of Swearing.