A general term of disapproval, of something that is troublesome or a nuisance.
It can come as as little surprise that the term 'cotton-picking' originated in the southern states of the USA, where it is usually pronounced cotton-pickin'. It began life in the late 1700s and differs from the 19th century Dixie term, 'cottonpicker', in that the latter was derogatory and racist, whereas 'cotton-picking' referred directly to the difficulty and harshness of gathering the crop. This didn't extend to the specific expression 'keep your cotton-picking hands off of me'. This no doubt alludes to the horny, calloused (and usually black) hands that picked cotton.
Of course, 'cotton-picking' must have been in use as an English adjectival phrase for as long as English-speaking people have picked cotton. There are numerous citations of 'cotton-picking' seasons/jobs/machines etc. since the late 1700s. J & E Pettigrew's Letters has an early example, from 1795:
'One of the students was banished... for going to a cotton picking after eight at Knight.'
Manual cotton picking was tough work. The southern expression 'cutting in high cotton', which means 'have it easy', refers to the relatively easy task of cutting cotton without having to bend down.
Our folk memory of grizzled cowboys in Hollywood B-features 'fixin to run that cotton-picking greenhorn outta town' etc., might give us cause to think that the use of 'cotton-picking' as a figurative term originated in the 19th century wild west. In fact, it didn't, and it doesn't even seem to have been spoken in any of Hollywood's numerous early cowboy movies. It isn't until the 1940s that the term began to be used in any other context than that of the actual picking of cotton. The earliest such reference that I have found is in the Pennsylvania newspaper, The Daily Courier, November 1942:
It's just about time some of our Northern meddlers started keeping their cotton-picking fingers out of the South's business.
Where memory doesn't play tricks is when recalling the works of the sainted Bugs Bunny. While not originating the term, Bugs can claim to have done more to fix it into the language than the rest of rabbitkind, especially in its most often used form 'Wait just a cotton-picking minute'. There's an example in Bully for Bugs, 1953:
"Just a cotton-pickin' minute, this don't look like the Coachella Valley to me!"