Do I have to wash the impurity like the blood before placing it in the machine?

No you dont need to if you are certain that the najasat would be removed in the rinsing cycles of the washing machine.