Defeat was a bitter blow for skipper Andrew Gale and his Yorkshire side after another great century from Jacques Rudolph and they will try to make amends by lifting the LV= County Championship title in the final round of matches next week.
Chasing a revised target of 260 in 37 overs under Duckworth-Lewis, Warwickshire were well in control until they slid from 203 for two to 216 for five.
The last three overs arrived with Warwickshire still requiring 23 to win and the issue was effectively settled by Maddy who lashed Steve Patterson for consecutive sixes over mid-wicket and long leg.
Rikki Clarke was bowled two balls later but the pressure was now off Warwickshire and two fours for Maddy off Anthony McGrath in the penultimate over saw the Bears home with seven balls remaining.
Maddy finished unbeaten on 34 from 19 deliveries with three fours and two sixes but the first four batsmen in the Warwickshire line-up also made significant contributions.
Openers Neil Carter and Varun Chopra lashed 65 from the first seven overs before Carter was lbw to Ben Sanderson for 40 but Yorkshire were unable to put their opponents under any real pressure.
Barker, surviving two difficult chances to Gale, knocked up 34 in a 52 stand with Chopra and was then well caught by wicketkeeper Gerard Brophy, standing up to Richard Pyrah, but this dismissal only brought in a determined Ian Bell who dominated a fourth-wicket partnership of 86 with Chopra.
Bell had dashed to 57 off 49 balls with four fours and three sixes when he was superbly caught on the boundary by Jonny Bairstow - and Adil Rashid claimed another wicket in the same over by having Jim Troughton caught at long off.
Chopra's fine innings ended when he drove Patterson to McGrath at mid-off for 76 from 81 balls with five fours and a six but the mounting excitement of the Yorkshire fans in the 5,100 crowd was soon quelled by Maddy.
A short delay to the start made it a 39-overs-a-side match and a total of four more overs were lost for a break during the Yorkshire innings which was given a positive start by Gale and Jacques Rudolph.
Once the early overs from Carter and Chris Woakes had been safely negotiated the pair flourished and each took a six off Woakes as the stand built up to 73 in 12 overs before Gale drove Barker into the hands of Clarke at long on to depart for 30.
Yorkshire then went through a lean spell during which Adam Lyth was dismissed by Ant Botha and McGrath was caught behind of Imran Tahir but either side of these mishaps Rudolph moved to a 46-ball half-century with five fours and a six.
After Yorkshire had gone 13 overs without a boundary, Brophy ended the drought by planting the last ball of Botha's spell into the crowd and it was the start of a furious assault by the wicketkeeper-batsman as he dominated a 99 stand in 12 overs with Rudolph, who calmly worked his way towards his fourth CB40 League century of the season.
Brophy had dashed to 64 from 46 balls with four fours and four sixes when Barker had him caught at long off by Troughton to make it 212 for three with a little over three overs remaining.
Bairstow made sure Yorkshire finished with a flourish as he thrashed an unbeaten 26 from nine deliveries with two fours and two sixes but the biggest cheer was reserved for Rudolph when he cut Barker to move to his century off 93 balls with nine fours and a six. He fell for 106 to the last ball of the innings bravely attempting to complete a second run off Bairstow's stroke.
Warwickshire's jubilant acting captain Bell said afterwards: "This is one of my proudest days with Warwickshire and we felt that it was a par score which we were chasing.
"I would even have been happy chasing a 300 target over a full 40 overs on the small North Marine Road ground and the lads batted very well all the way down."