Middlesex 322 for 3 (Stirling 127*, Morgan 100) beat Gloucestershire 289 (Cockbain 106*, Higgins 65) by 33 runs
Middlesex posted 322 for 3 after losing the toss, under clear blue skies, with Stirling batting through the innings for 127 not out, Morgan contributing exactly 100 as he tuned up for England's one-day series against Australia and Hilton Cartwright hitting a rapid 60 off 41 balls.
In reply, the hosts scored 289 all out, Ian Cockbain top-scoring with 106 not out and former Middlesex player Ryan Higgins making 65.
James Franklin claimed 3 for 42 against his old county, but results elsewhere meant it was too little too late for his side to reach the knockout stage.
Decent opening spells from Higgins and David Payne saw Middlesex struggle to 48 for 2 in the 13th over, Dawid Malan falling to a brilliant diving catch by wicketkeeper Gareth Roderick off Higgins and Nick Gubbins playing-on to Chris Liddle.
Payne, making his first appearance of the season following ankle surgery, hobbled off after bowling six overs. Stirling was ready to settle in for the long haul as Morgan went on the attack, reaching a 39-ball fifty with a six over Graeme van Buuren over wide long-on.
Left-arm spinner van Buuren suffered as Morgan hit three more maximums in a single over. Stirling cut loose with a big six into the flats at the Ashley Down Road End off Benny Howell as the pair added 158 in 23 overs.
Morgan's century occupied 69 balls. He was out shortly afterwards as van Buuren exacted some revenge by catching him off a skier to give Benny Howell a wicket.
Stirling, dropped on 53 by Cockbain at point off Higgins, went to three figures off 128 balls and provided the base for a big total, while Cartwright smashed five sixes off the weakened Gloucestershire attack in what proved a decisive flourish.
In reply, the home side raced to 42 off five overs before a clatter of wickets saw openers George Hankins and Chris Dent depart either side of Howell. Franklin claimed two of the wickets.
Gareth Roderick was run out by Cartwright in a shambolic mix-up with Cockbain over a quick single and Gloucestershire were in disarray at 74 for 4.
Cockbain counter-attacked with sixes off successive deliveries from Nathan Sowter and Jack Taylor hit a breezy 33 before being bowled by the leg-spinner, playing across the line.
Higgins moved confidently to fifty off 59 balls and celebrated with a big six over mid-wicket off Tom Helm before miscuing an attempted big hit off the same bowler and skying a catch to Stirling at cover.
He and Cockbain had added 116 in 19 overs. The latter went on to record Gloucestershire's one and only century in the competition off 109 balls, but his efforts were in vain as the tail folded tamely.