Australia’s disciplined bowling performance restricted Sri Lanka to 239-8, but they looked to have suffered a blow when Khawaja limped off after being hit on the knee while fielding.
He later emerged to open the batting alongside captain Aaron Finch and continued his push for a spot in the Australian top order with a 105-ball 89.
Shaun Marsh (34), Glenn Maxwell (36) and Marcus Stoinis (32) failed to build on solid starts but wicketkeeper-batsman Alex Carey and Pat Cummins ensured Australia chased down the total with 31 balls to spare.
Finch, who deployed eight bowlers on a chilly day in Southampton, was pleased with preparations ahead of their World Cup opener against Afghanistan on Saturday.
“Feels like we are ready to go,” Finch said. “Practice games are great to keep ticking the boxes and ensure we are doing our basics well.
“Guys are putting their hands up, and it will be a brutal selection call come our first game.
“We have specific plans against Afghanistan, they have some world class players.”
Sri Lanka were off to a steady start after opting to bat first but wickets at regular intervals from Australian spinners in the middle overs meant they failed to post a big score.
Opener Lahiru Thirimanne carved out a composed half-century but his dismissal by off-spinner Nathan Lyon sparked a middle-order collapse as Sri Lanka slipped from 110-2 to 161-6.
All-rounder Dhananjaya de Silva (43) shared a 64-run seventh-wicket stand with Thisara Perera (27) to ensure Sri Lanka breached the 200-run mark, before Mitchell Starc rattled his stumps in the 47th over.
Fast bowler Pat Cummins was Australia’s most economical bowler, collecting 1-23 from eight overs, while leg-spinner Adam Zampa collected 2-39 from nine overs.