The 23-year-old wicketkeeper-batsman thrilled the Lord's crowd with a scintillating 121 from 74 balls.
His innings, and with it England's hopes, ended unceremoniously when he was run out in the final over.
Kumar Sangakkara set Sri Lanka on their way to 300-9 with a fine 112, which included 14 fours.
"England will be kicking themselves. They will feel elated at seeing one of their team-mates play such an innings, but they will be deflated too. Perhaps they need more power at the top; they need to start the chase quicker."
If Sangakkara's innings proved the most important, Buttler's was the most explosive.
From the depths of 111-5, he smashed the fastest ODI century by an England player, hitting 11 fours and four sixes.
He and Ravi Bopara added 133 in 16.2 thrilling overs to keep pace with a required run-rate of more than nine an over.
Although Bopara fell for 51 with 57 needed off 32 balls, Buttler's explosive strokeplay carried England into the final over needing 12 to win.
However, Chris Jordan holed out at long-on from the second delivery and Buttler was comfortably run out chasing an impossible single off the fourth as the brilliant Lasith Malinga limited England to four runs.
Earlier, left-hander Sangakkara showed why he is considered one of the game's greats with a fluent 19th ODI century as he and fellow veteran Tillakaratne Dilshan (71) put on 172 for the second wicket after England won the toss.
They were aided by England's bowlers, who struggled to find the movement that helped them bowl Sri Lanka out for 67 in the third ODI at Old Trafford on Tuesday.
Jos Buttler: 61 balls v Sri Lanka, Lord's, 2014
Kevin Pietersen: 69 balls v South Africa, East London, 2005
Ravi Bopara: 74 balls v Ireland, Malahide, 2013
Marcus Trescothick: 76 balls v Bangladesh, The Oval, 2005
Paul Collingwood: 77 balls v Bangladesh, Trent Bridge, 2005
Left-arm seamer Harry Gurney claimed 4-55 in his fifth ODI, while James Anderson and Jordan shared four expensive wickets.
England's chase began sluggishly as captain Alastair Cook and opening partner Ian Bell fell to Malinga inside the first four overs.
Gary Ballance and Joe Root, who made 42 and 43 respectively, were steady but unspectacular as England struggled to build momentum - between the ninth and 31st overs they failed to score a boundary.
Once Eoin Morgan fell for 12 in the 29th over, it appeared England were heading for a forgettable defeat.
But Lancashire's Buttler, who made his one-day international debut in 2012, and Bopara rescued the hosts with the highest sixth-wicket stand in ODIs at Lord's.
After Buttler smashed Nuwan Kulasekara for two sixes and a four in the 46th over, an improbable victory was in sight with 36 needed from 24 balls.
But Malinga ensured the series would be decided at Edgbaston on Tuesday with an immaculate final over.
Jos Buttler made a superb century but England lost by seven runs to Sri Lanka, who levelled the one-day series at 2-2 with one game to go.