Try that with battery by itself. See if you can reproduce that issue. Then remove the battery and use AC power alone. See if you can reproduce this issue. If it happens on one or the other, replace the offending item. If it happens on both, send the notebook in for service with AC and battery. (Most likely it is internal!)
Remember, you must test with just AC alone and battery alone in order to eliminate the possibility of an easy fix vs. serious repairs.
Laptop: HP Pavilion 17-e016dx. AMD A8-5550M, 4GB RAM, 750GB HDD, AMD Radeon HD 8550G integrated video, 17.3" display, 1600*900 (HD+) resolution, SD card reader, Windows 8 (DL Start8)