Phone stuck in charging mode also while not connectedSupport

Hi all. Suddenly, during the night, my phone began, while not connected to the charger, to switch from the charging mode (% shown on the screen saver) to the "normal" mode (no %); I tried to reset to factory default it, but nothing happened. Now is stuck in charging mode (animation in battery icon charging) regardless being connected to the charger or not.
It seems also that the battery duration is also very limited now, maybe for this problem. Any ideas? I don't like the idea of throwing it in the bin.
Thanks a lot.