Archer claimed the vital wicket of Eoin Morgan just as England’s white-ball captain threatened an unlikely win for the hosts with his score of 90, his highest in T20 cricket.
The Barbadian-born seamer then bowled John Simpson to seal victory before completing his hat-trick by trapping James Fuller LBW.
Archer said: "I wasn’t really thinking about what happened in the game here last year. I was more worried batting here than bowling, to be honest! But it’s good to actually leave here with a win.
“I thought we bowled really well in the last game, we took a total of 127 almost to the last over. So we know what we’re capable of and today just shows that.
“To get a hat-trick, I can’t really believe it – especially for a domestic T20 as well, it’s not like it’s an international game and I’m really honoured to hear that they want to put my shirt in the museum here at Lord’s.”
The drama came after a blistering half-century off just 19 balls from Phil Salt and 49 from debutante Delray Rawlins had helped the visitors post a challenging total of 168.
The victory was the Sharks’ fourth of the campaign, but defeat for Middlesex leaves them needing cricket’s equivalent of snookers if they are to qualify.
Smarting from defeat at the hands of Gloucestershire 24 hours earlier where their batting failed them, the men of Hove were given an electrifying start by Salt.
The Welshman set the tone by hitting successive sixes in the first over, bowled by Steven Finn, a long-hop pulled over square leg, followed by one drilled over long-off.
Finn claimed some recompense when catching the dangerous Luke Wright at backward point off Patel (2-27) for just 5, but Salt continued his onslaught, twice depositing Ashton Agar into the crowd, the second maximum seeing him to 50.
Agar (3-41) bowled him next ball with a quicker delivery, the first of three wickets in as many overs for the Australian, but with the victims costing more than 10-an-over Sussex had 98 on the board at halfway.
Rawlins took up the quest for runs, one reverse sweep into the stands off Agar probably the shot of the innings.
At one stage it looked as if Sussex’s highest score in the format at Lord’s (202) made five years ago might be under threat but to their credit a Middlesex attack pummelled for 229 by Somerset in their last outing fought back well.
James Fuller (1-20) was the first to apply the brakes before Patel bowled Ben Burgess to leave Sussex 150-6.
Then Barber took centre stage, having Rawlins caught by Fuller out in the deep, one short of a deserved 50, though the catcher and Nick Gubbins collided in pursuit of the ball, Fuller doing well to cling on as he fell.
Left-armer Barber would go on to claim the scalps of David Weise and Chris Jordan to make it three in six balls, the second match running he had taken a trio of wickets in an over.
And Sussex were all out with two balls left of their innings when Rashid Khan was caught on the fence to give Fuller a deserved wicket.
Middlesex made the worst possible start, losing dangerman Paul Stirling for nought to the third ball of the innings, Wright producing a fine diving catch at cover off the bowling of Weise.
And when Max Holden fell in the fifth over with just 25 on the board Middlesex were in trouble.
Morgan’s counter-attack was breath-taking two sixes and five fours, one a gorgeous reverse-sweep helping glean 31 in just two overs.
He and Nick Gubbins raised a 50-stand in 30 balls, of which Morgan contributed 42.
Gubbins was stumped off Danny Briggs (2-22) for 25, but Morgan went to 50 off 32 balls.
Another huge six off Rashid followed, but the run-rate kept climbing and Stevie Eskinazi was bowled by Jordan in the quest for quick runs.
While Morgan remained, Middlesex were still in the game and another huge six meant got the equation down to 16 off the final over.
However, he holed out to Jordan in the deep as Arche (3-25) became the brightest light of a evening littered with star performers.
Middlesex captain Morgan said: "I felt I could have done a bit more. When you get a score like that you want to be on the winning side and it’s disappointing when you’re not. There are a lot of positives from tonight. Coming out of their powerplay we would definitely have taken 168 (as a target). We did a great job to peg them back.
"I thought we were ticking on nicely throughout our innings. There was a dramatic improvement against spin compared to the last few games that we’ve played and we were never really in trouble. But Jordan and Archer bowled really well at the end. They are two quality death bowlers and we just didn’t have an answer to them.
"We asked the guys to make more positive intent (with the bat) and they did try. It is something to make another improvement on tomorrow night against Surrey."