You probably can't fix it.
Either dirt has got into the cooling air that stops the motor from catching fire - or more probably the internal filter that traps the dirt and dust to stop it harming the motor - is blocked.
The motor is overheating and destroying itself.
Clean the internal filter - you may get away with it but I doubt it - your machine might be a terminal case in its later stages.
The flames signify too hot - the grinding noise suggests dirt and grit have got into the motor.
Good Luck..., March 2016