While modern times may have us using this phrase as a substitute for caring (i.e. I don't give a flying fuck what you do, just get me a drink) the true origins aren't quite the same.
The expression dates back to the 1845 in a volume by Thomas Rowlandson entitled: "Pretty Little Games for Young Ladies and Gentleman: With Pictures of Good Old English Sports and Pastimes." Contained within the volume were ten etchings each along side a poem that appears to also be the work of Mr. Rowlandson. The volume celebrated such past-times as fellatio, cunnilingus and others.
In this particular etching a young man and his lady
are on horseback
at a gallop
. Her skirt is raised to show her rear, and his mighty penis
is pushed beneath as to enter her vagina
. Both faces are flushed with passion
and are accompanied by the following verse
Well mounted on a mettled steed
Famed for his strength as well as speed
Corinna and her favorite buck
Are pleas’d to have a flying fuck.
So think of that the next time you announce that you give a flying fuck. Somebody might just take you seriously.
Playboy’s Book of Forbidden Words p. 119
Robert A. Wilson, ed.
Playboy Press, 1972. 427 Wi69p
Etymology of a Dirty Word: http://www.urbanlegends.com/language/etymology/fuck/fuck_references.html