In Windows 11, it is safe to eject a hard drive only after closing files and apps on the drive. In the system tray, click the icon of safely removal of hardware, and choose your device. Assuming that it is not going to eject, open Task Manager and terminate processes with the use of the drive. Disk management can also be used to put the drive offline. Finally, you need to restart PC and then carefully remove the hard drive.