Start the computer and TAP F2 to enter the bios. Once in the bios navigate to the Power Management tab and then to AC Behavior. Remove the checkmark from the box that reads "Wake on AC" Save changes and exit.  You can also restore defaults in the bios to see if that will resolve the issue.
My dell laptop automatically turn off and sleep mode when charger plugged in .   And if laptop turn on when charger plugged in but laptop is shut down  
Laptop automatically turn on when charger plugged in