Go to your laptop BIOS settings.
Check whether an option like power on AC is enabled.
If it is enabled disable it and thats it.
Let me remind you this:
You might not find this setting as soon as you go into your BIOS.
You might have to do some digging around to get to this setting(if present).