This error might have been faced by all USB drive users at one time or the other when trying to eject it.
This sought of condition occurs when some application/process from your USB drive is being accessed/used by your system or when any application in the USB drive is running or else it may also show up when some virus files are running in your drive.
How-To Overcome (after each step try ejecting, if it’s not ejecting successfully then go to next step)
1) Scan your USB drive with the latest updated anti-virus software and clean the infected files if any.
2) Close all the applications in your USB drive.
3) Unlock the files that the OS is using from your pen drive and all the process that are running from your USB drive with the help of a very small and efficient software called Unlocker.
Download Unlocker (Freeware) from FileHippo.com
After installing the software Goto My Computer and righclick on your USB drive, which gives you a shortcut menu, there you get to see the ‘Unlocker’ option (shown below)click on it.
Then you get the Unlocker window showing all the process running and the process path and other details.
Click on Unlock all (shown below)
That’s it!! Now Eject and there will be no problem.