If you do not want your Laptop computer to shut-down when the Lid is closed, you can associate other actions like “Hibernate” or “Do Nothing” with the Lid Closing action on your computer.
Selecting the “Do Nothing” option leaves the computer in the same condition that it was prior to Lid Closing, which means; it can potentially remain switched ON, even when the Lid is closed.
Hence, this option is not recommended from battery life point of view and also due to possibility of the Laptop becoming overheated, if it ends up being placed in its case.
Laptop Shuts Down When Lid is Closed
All that is required to prevent Laptop from shutting down when the Lid is closed is to go to “Power Options” screen and click on “Choose what closing the lid does” link.
On the next screen, you will be able to select your desired option (Sleep or Hibernate) for the Lid Closing Action on your computer.
1. Prevent Laptop From Shutting Down When Lid Is Closed
You can follow the steps below to prevent your Laptop computer from shutting down when its Lid is closed.
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, select your desired option (Sleep or Hibernate) in the Battery column and this will prevent the computer from shutting down, when the Lid is closed.

As mentioned above, selecting the “Do Nothing” option for Battery section is not recommended due to its potential to keep the Laptop unnecessarily switched ON, even when it is not being used.
Hence, it is recommended that you select the Hibernate option, which saves battery life and also ensures that your computer is able to quickly spring back to life in the same condition in which you had left it.
Note: If you are thinking in terms of selecting the “Sleep” option, you can refer to this guide: Stop Laptop Going to Sleep When Lid Is Closed.