Hampshire booked their place at Finals Day at Edgbaston later this month after Lancashire's Gareth Cross, needing four off Sohail Tanvir's last delivery, could only manage two.
The home side amassed a formidable 202 for three after being put in, but Lancashire, requiring more than 10 runs an over on a flat pitch, almost got there as they threatened a major upset.
Hampshire's hero was their opening batsman Michael Carberry who reached a century from the last ball of his team's innings.
But his work was almost undone by some big hitting from Lancashire's fifth-wicket pair of Cross and Steven Croft and by some poor late Hampshire bowling.
Cross and Croft put on 68 from the final six overs, hauling Lancashire back from the brink of defeat at 133 for four in the 15th.
Lancashire kept their nerve as 57 were needed off the final four overs and then 17 from the last, bowled by experienced Pakistani Sohail.
Sohail conceded a no-ball off the first delivery and struggled for direction and control to silence a big home crowd fearing the worst.
But in the end Sohail recovered his poise and two-time winners Hampshire got through to their fourth successive finals day.
It all seemed a formality for rampant Hampshire as Carberry and James Vince put on 110 for the first wicket in 10 overs, with Vince smashing 60 from 30 balls until holing out on the midwicket boundary.
Carberry's first T20 century came off 66 balls and included 11 fours and three sixes.
Opener Tom Smith struck two sixes for Lancashire to set the tone for the response, Karl Brown hammered 49 and not even the loss of Simon Katich first ball to Danny Briggs could halt the charge.
Stephen Moore made 44 but his dismissal to a caught and bowled by Liam Dawson seemed to mark the end of the Lancashire assault.
Then came Croft and Cross's late onslaught but the task proved to be just beyond them, Lancashire finishing stranded on 201 for four on a thrilling night's entertainment when 403 runs were scored in the combined 40 overs.