I had this problem with my iPhone 6 when plugging it into my Macbook Air.
I have tried to change the cord, and I have also tried another also original cord with my friends iPhone, but the repeated beeping was just randomly there - it was clearly something wrong with both of my Macbook Air USB ports. What kind of weird bug is this? It has started maybe few months ago, once in a while, but now it can go like crazy, every second.
Now I have tried to put my iPhone to airplane mode and IT REALLY WORKS. iPhone is charging quietly first time in weeks. WOW.
THANKS GUYS for help. Saved me a trip to the service.