Wicketkeeper batsman Buttler smashed a 43-ball 71 after Stokes hit a fluent 70 and England posted a total of 316 for eight wickets on the way to their first win over Australia on the tour.
Opener Aaron Finch notched his second century of the series to lead the hosts' reply but his 108 off 111 balls was not enough.
Stokes returned with the ball to pick four wickets as Australia, without the rested Michael Clarke, David Warner and Brad Haddin, were shot out for 259 runs in 47.4 overs.
England lost the last one-day international against Australia at home and had suffered eight consecutive losses to their arch-rivals including the 5-0 Ashes whitewash.
Put in to bat first by Australia's stand-in captain George Bailey, England made a blistering start through openers Alastair Cook (44) and Ian Bell (55). The pair added 87 for the first wicket before Cook was bowled by Glenn Maxwell.
Stokes came in at number three and shared half-century stands with Bell and Gary Ballance (18) for the second and third wickets to lay the foundation for Buttler's pyrotechnics.
England lost Stokes, who made his maiden ODI fifty, and Ravi Bopara (three) in quick succession during the batting powerplay but Buttler and Eoin Morgan (33) added a quickfire 71 for the sixth wicket to take their team close to the 300-run mark.
Buttler hit six fours and four massive sixes before he fell to James Faulkner, who picked up four wickets for Australia.
Finch and Shaun Marsh (15) gave Australia a rapid start to their chase before the latter was caught brilliantly by Bell off Tim Bresnan at second slip.
Finch added 64 for the second wicket with Matthew Wade (23) to keep his team in the hunt but the hosts, who had already won the five-match series with victories in the first three games, kept losing wickets at regular intervals.
Stokes returned to the attack to seal England's much-needed victory and the last match of the series will be played in Adelaide on Sunday.
Image: Ben Stokes
Photograph: Robert Cianflone/Getty Images
Warne to coach Australia spinners ahead of T20 World Cup
Faulkner's late heroics power Australia to one-wkt win over England
Australia beat England in third ODI to claim series
PHOTOS: WAGs scorch red carpet at Allan Border Medal awards night
PHOTOS: Johnson edges Clarke to win Allan Border Medal