The Bais Yosef and the Rema both hold (EH 1) that if you father Mamzeirim (Illegitimate children), they are considered valid children for the mitzva of Piru U’Rivu. The Minchas Chinuch  says that this applies to both Mamzeirim who were born from valid marriages, such as a Ger who marries a Mamzeres, as well as Mamzeirim who were born from an illicit relationship.
The Minchas Chinuch asks, how can you be Mikayem your Mitzva of Piru U’Rivu by fathering children through an illicit relationship since it is a Mitzva Haba B’Aveira? He answers that a mitzva is disqualified only if the action you take in performing the aveira is the Mitzva itself. For example, the Shaar HaMelech (Hilchos Lulav 8:5) says that when you shake a stolen Esrog, the actual shaking is both a mitzva and an aveira of holding on to stolen property without returning it.
However in the case of Mamzeirim, the relationship with the women is not the mitzva, it is only Hechsher Mitzva, the preparation for the mitzva. The Kiyum HaMitzva is the children themselves which come at a later time than the aveira. Therefore Mitzva Haba B’Aveira does not invalidate children born from this aveira. The above is taken from the Minchas Chinuch and is not in anyway P’sak Halacha. Furthermore it is the author’s understanding of the Minchas Chinuch and may not be completely accurate.
Share this with your friends and be a partner with www.revach.net in Harbotzas haTorah.