Scoop up as much of the detergent as you can. A large serving spoon from the kitchen may help you in this step.
Wipe up even more of the detergent with towels or rags. Be careful not to press the detergent into the carpet.
Fill the water tank of a carpet cleaning machine with warm water only. Do not add a carpet cleaner like you normally would.
Go over the area quickly with the carpet cleaner, holding down the spray button to lightly spray the carpet. Do not soak the carpet with water.
Extract the water and detergent by repeatedly going over the area of the carpet where you spilled the washing detergent. Empty out the suds from the carpet cleaning machine as necessary.
Push the spray button to add just a little bit of water every five to six passes. Continue to make passes across the carpet area, extracting as much of the detergent as possible.
Repeat two or three times a day for a couple days until the washing detergent is completely removed from the carpet.