Adam Wilson, of Lostock Hall, was found with serious injuries at a property on Albrighton Crescent in Lostock Hall near Preston in September.
Jason Taylor, 21, of Westfield, Lostock Hall denied murder but was found guilty after a trial by jury.
At Preston Court, he was ordered to serve a minimum of 25 years.
Mr Wilson died as a result of catastrophic bleeding from a stab wound in his thigh, the Crown Prosecution Service (CPS) said.
Sophie Lorimer from the CPS North West said the "brutal attack" in front of his ex-partner was "purely motivated by jealousy".
"He could not accept that the relationship with his ex-girlfriend was over," she said.
Taylor's girlfriend said he bombarded her with text messages and phone calls which "progressively became more and more abusive".
"The final text he sent to her stated he was giving her one last chance before things turned sour.
"Minutes later he violently broke into her house where Adam Wilson was also present."
Ms Lorimer said Taylor then stabbed Mr Wilson numerous times with a large knife which he had taken with him.
Taylor carried out the "frenzied" knife attack "fully aware" there were two young children also present at the house, she said.
He then fled and hid from police in a neighbouring garden, she added.
Ms Lorimer said Taylor had shown "no remorse" throughout the case in which he claimed he was acting in self-defence.
Det Ch Insp Neil Ashton of Lancashire Police said Taylor's actions were carried out "in anger and jealousy".
He said: "His actions were completely unprecedented and resulted in the needless and very sad loss of a young man's life."

County are tenants at the ground which is also used by rugby union teams Newport Gwent Dragons and Newport RFC.
"We've already made our position clear in respect to the pitch issues and what we're dealing with," Davies said.
"It points to the fact Newport County are bottom of the league and I suggest he focuses on preparing his own side."
"I'm not sure why he [Westley] feels it necessary to go on about it," Davies told BBC Wales Sport.
Davies is also the chief executive of Rodney Parade Limited, which owns the ground and agreed a 10-year lease for the football club to use the stadium in 2013.
On Thursday, Westley questioned whether Newport County were getting value for money out of the leasing deal.
The Exiles have had two games - against Morecambe and Barnet - abandoned at half-time while their game against Stevenage in October was postponed because of the state of the pitch.
"It costs us more for us to have County playing there than it's worth. The estimated cost of drainage work is worth twice as much as we receive from County each season," Davies continued.
The Dragons were beaten 10-0 by Ospreys at Rodney Parade on New Year's Day on a dreadful pitch and Davies says he is aware of the state of the playing surface.
"This issue is very important and I'm not trying to say the pitch is perfect. We're doing all we can to repair the pitch but there's no short-term solution," he said.
"In the meantime, it helps no-one that it continues to dominate the agenda."
A man who murdered a Lancashire man in a "jealous, frenzied knife attack" at his ex-partner's house has been jailed for life.
[NEXT_CONCEPT]
Newport Gwent Dragons chief executive Stuart Davies says he is disappointed at Newport County boss Graham Westley's criticism of the Rodney Parade pitch.