I was having this trouble too. My external hard drive can't be ejected properly even if I close all running apps. I looked up resources from different channels and found that there are diverse causes for this issue. Among all them, Spolight running in the background still using the external HD is the most possible reason.
Mac Spotlight keeps indexing the data stored in the connected external HD. So, when you prepare to eject it, you find that you can't eject the external hard drive on your Mac.
You can force quit Spotlight in Activity Monitor first and then try to eject your external HD. I have to tell you that mds and mds_stores are the index processes of Spotlight, you also need to force close it.
- Open Launchpad on your Dock > Other > Activity Monitor.
- Search for Spotlight and select it.
- Click the top Quit button to close it.
- Continue to force quit mds and mds_stores in Activity Monitor.
Besides, these tricks can also help you out the dilemma.
1. Check if your way to eject external hard drive on Mac is right or not.
2. Run First Aid to fix the disk to exclude the possible errors in the file system.
Hope my tricks can help you fix the external hard drive not ejecting on Mac issue.