Thou hypocrite, first cast out the beam out of thine own eye; and then shalt thou see clearly to cast out the mote out of thy brother's eye.
Note 47 at Mt 7:5: The symbolism in Mt 7:3-5 is very clear: don't be hypocritical in your judgment; straighten yourself out first. However, it does need to be emphasized that this is further comment on judging, which Jesus mentioned in Mt 7:1-2. Although there are many applications of this truth, it was not given as an unrelated statement.
In Luke's account of this illustration (Lu 6:41-42), notice that Lu 6:43-44 is tied to it with the conjunction "For." That amplifies this point by saying that if you are corrupt yourself, you can't produce good fruit. Your reputation is built upon who you are, not who you correct (Lu 6:44).