Mix a mild liquid soap in a bowl with two quarts of water, and gently lower the wig into that. Let it soak for 5 minutes. Gently lift it out and drain for a minute, then gently lower it into a rinse bowl with just a couple quarts of clean water. Again, lift and drain.
Don't agitate or wring the wig out. That just tangles it and may damage the cap.
Set the wig on a wig stand, a simple frame that lets air circulate around the wig. I usually just set these on a bath towel and let the wig drip.
After the wig has drained for several minutes, get a spray pump bottle of wig conditioner, which you can find online or from a wig shop (I use the HairUWear conditioner). Spray it fairly liberally on the wig, making sure you get the whole thing. Let the wig dry on the stand for 24 hours. DO NOT BRUSH YET!
After 24 hours of drying time, gently brush the wig out using a wig brush, a brush with LOOPS of soft plastic, not bristles, that's really coarse. (Again, online or a wig shop.) The tangles in my synthetic wigs just vanish with this treatment.
https://www.amazon.com/Hair-Softness-Leave-Conditioner-Detangler/dp/B001ERQFYIhttps://www.amazon.com/Brittny-Professionals-Wig-Brush-Combo/dp/B005HFYOP0