Sean McLauchlan, 25, stabbed 29-year-old Scott Gillies outside a flat in Glasgow on 16 May 2015.
A jury unanimously cleared him of murder and assault after hearing that both men were armed with knives and Mr Gillies had already slashed him.
There were angry scenes involving the dead man's family following the verdict at the High Court in Livingston.
Furious relatives and friends of Mr Gillies, described as a "gentle giant", stormed out of the court with one woman shouting: "This is what you call justice?"
Judge Lord Burns formally acquitted Mr McLachlan, who was led out a back door.
The court heard that both men had been at an all-night party in the flat in Benalder Street, Partick,
The jury heard that Mr Gillies and his girlfriend Cheryl Dawson had been thrown out just before 08:00 because he had allegedly made offensive comments to the host and her sister.
He had earlier shown other guests an open razor and a flick knife which he had taken out with him that evening.
The couple kept trying to get back in to the party and clashed aggressively with female guests after kicking the door of the flat three times.
The third time, Mr McLachlan went out past the women onto the landing and got involved in a fist fight with Mr Gillies who slashed his top lip.
Giving evidence, the accused said he ran back inside and was attending to the wound in the kitchen when he heard the door being kicked in for a fourth time.
He told the court: "I was scared, terrified. Then I heard Scott saying: 'Get Sean out here. He's going to get stabbed...He's getting done.'
"He was talking about me. I was terrified. That's when I turned around and grabbed two knives from the sink."
He added: "The minute I stepped out the kitchen I seen Scott Gillies coming up the hall.
"Scott ran towards me. He had a knife in each hand and he struck us on the head. The blood started to run into my eyes and onto my face from my head.
"At that point I was just scared for my own life.  I thought I was going to be killed.
"I swung back to try and get him off us. I was swinging my hands to get him away from us."
The jury was told that during the fight, Mr McLauchlan plunged an eight-inch kitchen knife up to the hilt in Mr Gillies left shoulder.
The blade cut a major artery in his lungs, and went into his chest. He died shortly afterwards from massive blood loss.
A post-mortem examination found that he had a blood/alcohol count almost six times the drink-drive limit at the time of his death and had taken ecstasy.
Following the fatal stabbing, Mr McLaughlin fled the scene and asked a man arriving for work at a nearby building site to phone the police.
The trial heard from witnesses who had attended the party.
Mikey Gillen, 22, said the victim and accused were drunk and Mr Gillies had stated the accused was "going to get done in".
Gina McNaughton, 22, said everyone in the kitchen was trying to stop Mr McLauchlan going out to the hall with the knives.
She said she heard banging noises then Cheryl Dawson walked in looking "shaken up" and shouting that Scott was dying.
She went on: "Then Scott walked in. He looked pretty grey. He just looked really shocked.
"He kind of leaned against the table. He didn't say anything. He fell to the floor."
A man who claimed he acted in self defence after killing a fellow partygoer has been cleared of murder.