The Foxes recovered from losing Mark Pettini four balls into their chase of 259 in 45 overs to reach 10-1 in the 14th over.
But they slipped to 165-7 in the 29th over and later 238 all out as they lost by 20 runs and failed to qualify for the knockout stage.
Yorkshire came into this engaging match already qualified, but a Worcestershire win at Derbyshire has consigned them to a home quarter-final play-off match against third in the South Group next month.
White Rose captain Ballance hit 71 off 66 balls in his 14th innings of the summer as the Vikings made 258-7 from 45 overs.
Ballance is the country’s leading run-scorer with 1,027 at an average of 93.36.
But spinners Azeem Rafiq and Karl Carver also had a huge impact on a match delayed by an hour due to rain.
Off-spinner Rafiq hit a scintillating 30-ball 52 not out and took two important wickets, while leg-spinner Carver was superb for his 3-24 from nine overs as the Foxes lost six for 58 through the middle of their innings.
They took 5-70 from 18 overs between them.
Adam Lyth hit 52 before Rafiq cut loose at the end of the home innings. Leicestershire were well placed after Gavin Griffiths took two of Yorkshire’s first four wickets to fall for 26 as they slipped from 72-0.
But Ballance, later out after hitting his wicket for the second time this season, and Tim Bresnan shared a fifth-wicket partnership of 73 inside 15 overs to kick-start a recovery which later saw 72 runs come from the final six overs.
Rafiq offered a skied return catch to Dieter Klein on two, although wicketkeeper Lewis Hill perhaps should have got there.
Rafiq went on to hit three fours and as many sixes in a 29-ball fifty.
Yorkshire then made the ideal start to their defence when Bresnan had Pettini caught at slip for a duck.
But Cameron Delport and Ned Eckersley did not let that deter them and blazed a trail, reaching 100-1 in the 13th over.
Left-handed Delport hit three sixes in a 36-ball fifty before holing out to long-off off Rafiq for 68 midway through the 14th over, ending a second-wicket stand of 107 in 13 overs
He then bowled Mark Cosgrove for a duck two balls later.
Carver, given his chance because of the absence of Yorkshire’s quartet of England players, then really put the skids under the Foxes.
He bowled Eckersley, had Hill caught at square cover and got Parkinson caught and bowled as the score fell to 165-7.
Leicester captain Clint McKay later hit 35 of a ninth-wicket stand of 42 with Klein to give the visitors a glimmer at 231-8 in the 40th before Matthew Fisher and Matthew Waite claimed wickets at the death as the visitors fell 21 short.
Spinner Carver said: “It’s great to get back out there amongst the lads. I’ve been dying to get out there. It’s just tough when you’ve got such a good squad as we have.
“It’s really nice to win in a Yorkshire shirt and contribute in a Yorkshire shirt. It means the world.
“Azeem bowled well and got the ball rolling.
“He helped me come on at a nice period. It’s always nice to bowl with him and build it together.
“Luckily it went my way today.
“We’re playing with enjoyment as a team and are expressing ourselves every time we go out there. We have a young side who can all contribute.
“We’ve got momentum and confidence.”
At Derby, Tom Kohler-Cadmore demolished Derbyshire’s bowling before Worcestershire survived a late wobble to celebrate a five-wicket victory under Duckworth/Lewis which saw them finish top in the North Group.
Chasing a revised target of 218 from 36 overs in a rain-hit contest at Derby, Kohler-Cadmore struck 63 including three sixes and eight fours off only 34 balls before Daryl Mitchell’s measured 67 from 71 balls guided the visitors to their first semi-final since 2004.
Shiv Thakor top-scored with 63 for the Falcons but Ed Barnard’s 3-37 from seven overs restricted the home side to 209-8 and although Hardus Viljoen took three late wickets, it was not enough to deny the Rapids.
Only 14.4 overs were possible at Wantage Road as Northamptonshire and Nottinghamshire shared a point each.
South African Dane Vilas’s second century of the competition guided Lancashire to win a 28-run win over Durham.
But neither side made progress in the tournament. Durham could have gone ahead of Nottinghamshire into third place, but the one point the Outlaws gained from the washout at Northampton ended Lancashire’s hopes.
Paul Collingwood’s three wickets saw Lancashire stumble to 126-4 after a good start, but Vilas’s onslaught helped them to gather 135 runs from the last 15 overs, compared with 76 off the previous 15.
The second 50 in his 83-ball century came off 26 balls and his fifth-wicket stand of 118 in 16 overs with Steven Croft proved crucial.