Clint McKay's hat-trick had England - chasing 228 to win - reeling on 8-3.
But a 108-run stand between Michael Carberry (63) and Eoin Morgan (53) revived them before Buttler finished it with a six and a four in the last over. Australia had lost their last five wickets for 18 runs to fall to 227 all out, with James Tredwell taking 3-53.