All I'm getting a is a dubious story about removing a fig from the buttocks of a mule.
All I can find on the earliest use of this particular insult is in Romeo & Juliet, it was basically the Elizabethan equivalent to sticking your middle finger or at someone today, so as you can imagine some people especially the types in Romeo & Juliet would've been highly offended.
I'm sure, Shakespeare based this type of insult on common insults of the age, however I'm not qualified to tell you what they maybe (hopefully someone else can fill in those gaps) however I did find a link on Elizabethan Slang from the University of Tulsa which I'll link below.
TLDR: The earliest known mention I could find is in Romeo & Juliet, to some people this may "highly" offend but I wouldn't exactly call it taboo (as it's really only a 16th Century equivalent to sticking up your middle finger)
"Sources"
Romeo & Juliet: Act 1 Scene 1 - William Shakespeare, courtesy of M.I.T.
University of Tulsa's "Elizabethan Slang"