Victory, with more than a day to spare, meant England had won only their second Test in nine attempts.
But they fell over the line here at Edgbaston.
Set just 78 to win, England made 81 for four with off-spinner Muttiah Muralitharan taking all four wickets for 29 runs.
Their success might have been less fraught had they been able to build on man-of-the-match Kevin Pietersen's whirlwind 142 in the first innings and give themselves a huge early advantage.
As it was, when the South Africa-born Man of the Match was out after striking three sixes - one an audacious reverse sweep against Murali - and 20 fours, his exit sparked a collapse that saw England's last five wickets fall for just five runs in 29 balls.
England had a healthy first innings lead of 154 but Sri Lanka also had a glimmer of hope.
"I thought we played a pretty good game to be honest," said Flintoff. "But we would have liked to have scored more runs. It's not easy going in against Murali for new batters who haven't seen a great deal of him.
"We should have got closer to 360, 370 (England were bowled out for 295) in that first innings."
Sunday's win meant England had won two, drawn two and lost one of their five Tests since Flintoff first captained the side during the drawn series in India earlier this year.
The Lancashire all-rounder, who again insisted he was only keeping the seat warm for the injured Michael Vaughan (knee), had been criticised for his formulaic tactics in the first Test against Sri Lanka at Lord's.
But he rarely missed a trick at Edgbaston, bowling himself less and bringing left-arm spinner Monty Panesar much more into the game with noticeable effect.
He also showed faith in Durham quick Liam Plunkett, who responded with match figures of six for 60.
"I just do what I think is right out there in the middle. I did that here again at Edgbaston and sometimes it can make you look great," Flintoff said.
Injuries to Stephen Harmison (shin) and Simon Jones (knee) have given the likes of Plunkett and Sajid Mahmood the chance to shine while Panesar has been the benficiary of Ashley Giles's hip and hernia problems with Alastair Cook impressing in number three batsman Vaughan's absence.
All of England's youthful quartet have taken well to Test cricket but Panesar's fielding remains a concern.
No-one doubts the ability of the first Sikh to play Test cricket for England as a bowler, but every time he touched the ball in the field there were raucous ironic cheers from the crowd, who believed a mistake was not far away.
"Monty bowled fantastically well and took crucial wickets," added Flintoff ahead of the third Test at Trent Bridge, set to start on Friday.
"He's become a bit of a cult figure, the crowd get behind him. He's a cracking lad and it's all light-hearted from the crowd.
"And with his fielding he works hard, he probably does more than anybody else."
Meanwhile, Flintoff, himself one of world cricket's most hard-hitting batsmen, admitted he'd been taken aback by Pietersen's dynamic display.
"I sat there sometimes with my mouth wide open thinking 'how has he done that?'. I've not seen anything like it, he's one of the most talented players I've ever played with."
For Sri Lanka, there was frustration that once again their first innings peformance had left them on the backfoot while there was also insufficient support for Muralitharan, who finished with match figures of 10 for 115.
But one plus was the second innings century from Michael Vandort, who resisted for over six-and-a-half hours on his way to 105.
During the Lord's match Vandort's fellow left-handed opener Sanath Jayasuriya, having previously announced his Test retirement, arrived ahead of schedule after it was originally planned for the former captain to play in the one-day series alone.
But such was the 26-year-old Vandort's display, Sri Lanka may yet stand by him - after a pair against England A - and Upul Tharanga for Trent Bridge.
"We lost the game on the first morning," said Sri Lanka captain Mahela Jayawardene. "Winning the toss on a very good wicket, we had to take advantage and we didn't."
Jayawardene, reflecting on Vandort's marathon effort, added: "He showed a lot of character and he held the innings together."
But he admitted: "We need to figure out a way of getting early wickets and helping Murali out."