After opener Aaron Finch (107, 119b, 10×4, 3×6) guided Australia to 304 for eight in their allotted 50 overs, Roy responded with a brilliant ton, fourth of his career, to help his team overhaul the target in the penultimate over.
Root, who had reached his best score of this series of 83 in a partnership of 133 with Dawid Malan, had taken England towards the big score that would have given them every chance of being victorious in this "must win" Test.
England started their innings in lightning fashion before the loss of Jonny Bairstow and Hales in quick succession preceded a match-defining 221-run stand between Roy and Root.
"To be out there on the MCG, win the game and make a score like that is incredibly special", said Roy.
Australian opener Aaron Finch has scored his ninth one-day global century to leave England chasing a target of 305 in Sunday's series-opener at the MCG.
The 50-over series beginning in Melbourne on Sunday begins a run up to the World Cup after which both England's coach Trevor Bayliss and his Australian counterpart Darren Lehmann will depart their roles, with neither man willing to extend their contract any further.
Time and again in this Ashes too many England batsmen have got themselves in and given it away rather than displayed the application integral to winning Tests in Australia.
But to see the bowlers, Mark Wood, Liam Plunkett and Adil Rashid - none of whom were part of the Ashes squad - all contribute vitally in their different ways was as galling as it was encouraging.
Especially the hosts. Australia will be defending that trophy when the time comes, but their form with the white ball is patchy at best over the last couple of years. Hopefully that was just a little blip.
Roy added: 'He wasn't too happy about that by the sounds of things, it's one of the first things the boys said about Halesy being pretty disappointed'. England then face a Test series at home to Pakistan and India next summer which might not be a walk in the park either. It shows the character of the bloke. "It was hard and tough and I knew the guys would be quite down". Moving Root to No 4 was a big decision but it was profitable today.
"The middle order's probably where we've had a bit of an issue", Smith said.
"We got a huge amount of confidence from the selectors".
"We tried everything we could to pull them back and take wickets but it wasn't our night". We weren't able to do that, and we didn't start as well as we'd like with the ball either, they got off to a flying start.