If an application is accessing the device while you are trying to start the "safely remove hardware" procedure, the system will show this message to avoid losing data. To enable a succesfull removal, just close all applications that are related to the drive, such as for example Explorer, Media Player which might be playing files directly from the device...etc.
Source : BTC