In the first place, we would like to stress that Islam is the religion of cleanliness. It urges Muslims to be neat and take care of their clothes and physical appearance. The Prophet (peace and blessings be upon him) is reported to have said, “Cleanliness is half of faith.”
Dr. Muzammil Siddiqi, former president of the Islamic Society of North America (ISNA), states the following: The clothes that are washed in automatic washing machines are clean or tahir. There is no need to wash them by hands before or after the use of washing machines. Of course if there is some solid najasah on the clothes, that should be removed before putting the clothes in the washing machine.
Soap does not negate the purification process. Actually it helps to purify clothes. Most of the automatic washing machines have several washing cycles and this makes the clothes quite clean and also tahir according to the requirements of the Shari`ah.