Chosen Solution

I was using my HP Pavilion 15cs0 normally then it suddenly shut down. I tried turning it back on but the power button light turned off after a second or two. I tried to remove the battery and power it directly through AC, and it was working for a bit then the problem happened again.

@ankoj Try a power refresh by disconnecting the charger and removing the battery and then pressing and holding the laptop Power button for a full 30 seconds then release. Reinsert the battery, reconnect the charger and the try to turn it on. If it turns on OK and boots into Windows etc, allow the battery to fully charge and then create a battery report to check the status of the battery. Compare the Design capacity value versus the Full Charge capacity value. For a good battery they should be nearly the same.