If your computer is completely shutting down when the lid is closed, it is certainly not displaying its default or regular behavior; which is to go into sleep mode.
While the most common reason for this issue is due to “Power Settings” on the computer being configured to Shut Down or Hibernate instead of sleeping, this problem can also be caused due to faulty drivers, fast startup and conflicting BIOS/UEFI power settings.
Prevent Laptop Shutting Down When Lid is Closed
The first step that is required to fix this issue is to open the Power Settings on the computer and make sure that the “Lid Closing” action is associated with “Sleep” and not “Shut Down”.
The next step would be to disable the “Fast Start Up” feature, which can sometimes make the computer to completely shut down and even freeze or hang up, instead of going into sleep mode.
In most cases, these two steps should fix the problem and other troubleshooting steps like updating drivers and checking BIOS/UEFI settings may not be required.
1. Adjust “Lid Close” Settings
As mentioned above, the most likely reason for the computer shutting down upon Lid closing is due to “When Lid Is Closed” option being set to “Shut Down” instead of “Sleep”.
1. Type Control Panel in the Search bar and click on Control Panel (Desktop App) in the search results.

2. On the Control Panel screen, switch to Large Icons view and click on Power Options.

3. On “Power Options” screen, click on Choose What Closing the Lid Does link.

4. On the next screen, go to “When I Close the Lid” entry and select the Sleep option for both “Battery” and “Plugged-in” sections.

This will ensure that your computer will go in to sleep mode, whenever its lid is closed.
2. Disable Fast Startup
The Fast Startup feature requires the computer to go into a hibernation-like state, which can create conflicts with “Sleep upon Lid close” setting.
Hence, it is highly recommended that you disable the “Fast Startup” feature on your computer, especially; if it is causing unexpected shutdowns, preventing the Laptop from waking up and also if you are noticing significant loss of battery life.
For more information and the steps to disable Fast Startup, you can refer to this guide: How to Enable/Disable Fast Startup in Windows 11/10.
3. Update Graphics Card Drivers
The issue of a computer shutting down when the lid is closed; especially when using an external monitor could be due to the Graphics Card Driver becoming outdated or faulty.
While you can try to update the Graphics card driver by using Device Manager, the best approach in this case is to download the latest drivers; directly from NVIDIA, AMD or the manufacturer of your computer.
For the steps to update drivers using Device Manager and updating drivers by downloading them from the manufacturers website, you can refer to this guide: How to Update Drivers In Windows (Auto/Manual Method).
4. Check BIOS/UEFI Settings
If above steps did not help, the problem could be due to BIOS/UEFI settings for the Lid closing actions on the computer being different and overriding the Control Panel settings.
You can check & confirm this by restarting the computer and pressing the required key (F2, F12 or Del) to Enter BIOS/UEFI Settings.
On the “BIOS Setup” screen, click on the Power tab, located in the left-pane > scroll down to Lid Switch section and Enable Lid Switch option by moving the slider to ON position.
Note: The location and names of BIOS/UEFI settings can vary, depending the manufacturer of the computer.