I have a Samsung Galaxy S4. It has it's own charger with a detachable cable, able to go to USB ports. This one to be exact, it works perfectly. I also have a Surface pro 3 and it's charger. As can be seen from the picture, it has a USB port for charging, it also works. It's when I combine my Surface charger and my Samsung cable, that I get a problem. The lightning icon appears on my phone, but it's not really charging at all. Changing the cable with my other cables fixes it.
The Power which your Phone consumes outway the Power a USB Port can supply.
This problem is often faced when using an Powerbank.
Cause could be an old Battery which lifetime is coming to a close, but thats anyones guess.
I would buy myself a charger that goes in to the Wall socket. Way more convinient.
For example, it would take 5h for my Nexus 5 to fully recharge from USB and only 2 hours from the wall Socket directly.