It could be a firmware issue or if you are not using the phone's original charger or if charging the phone using a computer or other related devices.
Another wall socket
Charge your phone using another charger
Check also if phone overheats a lot (not quite warm) during charging
Please note that using the phone while charging can hum your phone hardwaretical