He guided England to victory with nine balls to spare.
Chris Gayle had starred with bat and ball for the West Indies, hitting 101 and taking 3-31, but still ended up on the losing side.
Dwayne Bravo also registered his first ODI century with an unbeaten 112 as West Indies scored 272-4.
West Indies won the toss and elected to field in a tie which was of academic interest to them.
Gayle put on 174 for the second wicket with Bravo after opener Shiv Chanderpaul had been dismissed for 13.
Jon Lewis took over from Steve Harmison, who was officially "rested" after being out of sorts with the ball during the tournament so far.
Lewis made the breakthrough dismissing Chanderpaul and bowled 10 tidy overs for figures of 1-35.
Unusually, Bravo was the more aggressive of the pair with Gayle happy to play a more subdued role but it was still effective as he reached a century in 127 balls seemingly without having to break into a sweat.
He was run out by Flintoff but Bravo followed him to three figures soon after, reaching his hundred off 117 balls with 12 fours and a six.
Andrew Strauss and Ian Bell let off Gayle and late on Michael Yardy failed to hang on to an easy chance to dismiss Ramnaresh Sarwan. There was also an uncharacteristic missed stumping by keeper Chris Read.
Following Gayle's departure, Bravo and Sarwan added 50 to the total before Sarwan was caught by Collingwood at long-on off Mahmood, who also claimed Brian Lara for three.
England were out of the traps quickly in reply, especially Andrew Strauss, who smacked a 46-ball fifty before losing his concentration and was bowled by Gayle for 51.
Flintoff had initially looked happy knocking the ball around for singles and twos but once he increased his aggression with the bat, he succumbed in customary style at holing out in the deep, this time for 25.
England work-horse Paul Collingwood's stay at the crease lasted all of one ball as he edged to Bravo as Gayle took two wickets in one over to leave England on 127-3.
And Bell, after completing his seventh ODI fifty, was run out immediately afterwards from a great piece of fielding by Lara, who showed no ill-effects of his bad back.
Michael Yardy's place in the one-day team is probably under threat after less than convincing performances in India. But the Sussex player looked as though he was at the wrong end of a dubious decision as Bravo claimed a catch but television replays showed the ball had bounced first.
And with the run-rate rising rapidly, Jamie Dalrymple succumbed to the pressure and was bowled by Marlon Samuels for eight and Read was out for four, dismissed by a slower Bravo delivery.
So it was left to the man with an appetite for the big occasion, Pietersen, who together with Sajid Mahmood's 14 off 12 balls, saw England home.
Pietersen left the fireworks to the end and then cashed in scoring the bulk of the last 44 runs needed in 3.5 overs with a huge six over long-off and some spectacular fours.