The holders went in front via Joao Cancelo's deflected first-half effort at the Kassam Stadium, but Matty Taylor equalised for the League One side seconds after the restart, before Sterling converted twice in close in.
City's win means the holders still have the chance to lift this trophy for a third season running and fourth time in five seasons.
City laboured through a fairly turgid 22 minutes before taking the lead courtesy of Cancelo. The former Juventus right-back broke at pace after being released by Phil Foden.
Cancelo's shot took a touch that wrong-footed Oxford goalkeeper Jordan Archer.
The Citizens had hardly turned on the style but just about merited the lead at the break. City's advantage didn't last long though and was wiped out with the sound of the second-half whistle still echoing through the air.
A quick free-kick saw the hosts play Taylor in behind. It was a chance the bullish striker didn't waste, finishing emphatically to leave City stunned.
There was some controversy about the goal because the ball appeared to be moving when the free kick was taken.
To their credit, the holders rallied swiftly and retook the lead when left-back Angelino guided a superb cross into the path of Sterling. The prolific winger was never likely to miss from close range.
Sterling's goal should have been the cue for a City bombardment, but instead Oxford proceeded to batter a young defence with an aerial assault aimed at getting Taylor more involved. Young central defenders Eric Garcia, 18, and 17-year-old Taylor Harwood-Bellis were just about hanging on.
Pep Guardiola wanted to ease the pressure on the inexperienced prospects at the back and duly beefed up his attack by introducing Ilkay Gundogan and Gabriel Jesus. It was the latter who made the difference when he crossed for Sterling to tap in again to put the tie out of Oxford's reach and add to his impressive tally across all competitions:
There were still chances, with Cancelo smacking a shot off the post, before Jamie Mackie lifted an effort over from inside the box at the other end. City also needed Claudio Bravo to make a clutch save when substitute Mark Sykes found some space from close range.
The Citizens eventually let their slick passing run the clock down and held off Oxford's spirited attempts to keep the contest alive. Those efforts didn't yield anything except make passage to the final four a nervy experience for City.