1707 as a direct phrase, but implied much earlier, and Old Norse had bikkju-sonr. Abbreviated form SOB from 1918.
Abide þou þef malicious!"Probably the most common American vulgarity from about the middle of the eighteenth century to the middle of the twentieth" [Rawson].
Biche-sone þou drawest amis
þou schalt abigge it ywis!
["Of Arthour & of Merlin," c.1330]
Our maid-of-all-work in that department [indecency] is son-of-a-bitch, which seems as pale and ineffectual to a Slav or a Latin as fudge does to us. There is simply no lift in it, no shock, no sis-boom-ah. The dumbest policeman in Palermo thinks of a dozen better ones between breakfast and the noon whistle. [H.L. Mencken, "The American Language," 4th ed., 1936, p.317-8]Elsewhere, complaining of the tepidity of the American vocabulary of profanity, Mencken writes that the toned-down form son-of-a-gun "is so lacking in punch that the Italians among us have borrowed it as a satirical name for an American: la sanemagogna is what they call him, and by it they indicate their contempt for his backwardness in the art that is one of their great glories."
It was in 1934 also that the New York Daily News, with commendable frankness, in reporting a hearing in Washington at which Senator Huey P. Long featured, forsook the old-time dashes and abbreviations and printed the complete epithet "son of a bitch." [Stanley Walker, "City Editor," 1934]