Ali ibn AbuTalib commanded him to ask the Messenger of Allah ﷺ what a man should do when he wants to have intercourse with his wife and the prostatic fluid comes out (at this moment). (He said): I am ashamed of consulting him because of the position of his daughter. Al-Miqdad said: I asked the Messenger of Allah ﷺ about it. He said: When any of you finds, he should wash his private part, and perform ablution as he does for prayer.
أَنْ يَسْأَلَ لَهُ رَسُولَ اللَّهِ ﷺ عَنِ الرَّجُلِ إِذَا دَنَا مِنْ أَهْلِهِ فَخَرَجَ مِنْهُ الْمَذْىُ مَاذَا عَلَيْهِ فَإِنَّ عِنْدِي ابْنَتَهُ وَأَنَا أَسْتَحْيِي أَنْ أَسْأَلَهُ قَالَ الْمِقْدَادُ فَسَأَلْتُ رَسُولَ اللَّهِ ﷺ عَنْ ذَلِكَ فَقَالَ إِذَا وَجَدَ أَحَدُكُمْ ذَلِكَ فَلْيَنْضَحْ فَرْجَهُ وَلْيَتَوَضَّأْ وُضُوءَهُ لِلصَّلاَةِ