Short answer. It can lessen it, not erase it. Immediate vindication of a grave offense against your close family is a mitigating circumstance under Article 13, which lists as mitigating that the act was committed in the immediate vindication of a grave offense to the offender or specified relatives. It reduces the penalty; it does not excuse the crime.
What the law says
That the act was committed in the immediate vindication of a grave offense to the one committing the felony (delito), his spouse, ascendants, descendants, legitimate, natural, or adopted brothers or sisters, or relatives by affinity within the same degrees.
Revised Penal Code, Article 13 — Mitigating Circumstances. Read the full provision →
Vindication of a grave offense mitigates
Article 13 of the Revised Penal Code lists the mitigating circumstances — matters that lessen criminal liability without wiping it out. One of them covers acting to avenge a grave wrong to one's family. The circumstance applies where the act was committed in the immediate vindication of a grave offense to the offender himself or to his spouse, ascendants, descendants, brothers or sisters, or relatives by affinity within the same degrees. The law recognises that a person who lashes out after a serious insult or injury to close kin acts under real emotional pressure, and treats that as a reason to soften — not to remove — the punishment.
What 'grave' and 'immediate' require
Two words do the heavy lifting. The offense being avenged must be grave — a serious wrong, judged against the gravity of the response, not a trivial slight. And the vindication must be immediate, meaning the reaction follows the offense closely enough that the person is still acting under its influence rather than out of cold, planned revenge. A long gap that allowed calm reflection can defeat the circumstance, because by then the act looks less like an impulsive vindication and more like a deliberate reprisal. The relationship, too, must fall within the degrees the article names.
Mitigating, not exempting or justifying
It is important to be clear about what this circumstance does. It is mitigating: it can lower the penalty within the range the law allows, but it does not make the act lawful and does not free the offender from criminal or civil liability. Avenging a grave offense is not the same as self-defense, which is a justifying circumstance that can lead to acquittal. Here the crime is still a crime; the offender is still guilty and answerable. The circumstance only tells the court to impose the penalty on the lighter side, in recognition of the provocation behind the act.
A note on the article's outdated part
One part of Article 13 no longer states current law. Its paragraph on the offender's age relies on thresholds that have been overtaken. Republic Act No. 9344 (2006), as amended by Republic Act No. 10630 (2013), now exempts from criminal liability a child fifteen years old or under at the time of the offense, and a child above fifteen but below eighteen unless he acted with discernment, sending an exempt child through intervention or diversion instead of prosecution. So the vindication rule discussed here remains good, but do not rely on the article's age figures — read them subject to RA 9344 and RA 10630.