Madhiy is najis (impure) and nullifies wudoo' according to scholarly consensus.
An-Nawawi (may Allah have mercy on him) said: The ummah is unanimously agreed that madhiy (a fluid which is usually secreted as a result of sexual excitement) and wadiy (a thick white fluid that may come after urination or due to other reasons such as illness) are najis.
End quote from Sharh al-Muhadhdhab, 2/571
And he (may Allah have mercy on him) said: Ibn al-Mundhir said: They are unanimously agreed that it (wudoo') is invalidated by the emission of stools from the back passage, of urine and madhiy from the front passage, and of wind from the back passage.
End quote from Sharh al-Muhadhdhab, 2/6
What is required when purifying oneself from madhiy is two things:
1. To wash the penis and testicles to remove whatever has gotten onto them of madhiy, because of what has been stated above of it being najis.
2. To do wudoo' to purify oneself from it when wanting to pray or to do anything for which wudoo' is prescribed, because madhiy is one of the things that invalidate wudoo', as stated above.
See also the answer to question no. 2458
With regard to washing off the traces of madhiy, this requires washing the traces from the affected part of the body; it cannot be imagined that this involves wiping over the khufoof, as is quite obvious.
As for doing wudoo' because of madhiy, it is like doing wudoo' in the case of any of the other things that invalidate wudoo'. If the individual put on his khufoof when in a state of purity, it is permissible for him to wipe over them when doing wudoo', because of the hadeeth of Safwaan ibn Assaal (may Allah be pleased with him) who said: The Messenger of Allah (blessings and peace of Allah be upon him) used to command us not to take off our leather slippers for three days except in the case of janaabah, but not in the case of stools, urine or sleep.
Narrated by at-Tirmidhi, 96; Ibn Maajah, 478; and others. Classed as saheeh by al-Albaani in Mishkaat al-Masaabeeh, no. 520
This indicates that wiping over the khufoof is permissible in the case of things that invalidate wudoo'. But in the case of janaabah (impurity following sexual activity), that requires ghusl so it is not permissible to wipe over the khufoof when purifying oneself from it.
Reproduced from Islam QA