Manchester United beat Manchester City 1-0 at Old Trafford as Jose Mourinho got some kind of revenge for the Premier League loss to Pep Guardiola last month.
It was far from a classic, with Juan Mata settling the game in the 54th minute when he stroked home from just inside the box.
Ibrahimovic played a pass across the box and after Ander Herrera and Fernando collided the loose ball ran for Mata, who sidefooted home from 10 yards out. It was the sixth consecutive game in which City had conceded the first goal.
There was no way back for Guardiola's men, who failed to have a single shot on target.
West Ham United's return to form continued as they beat Chelsea 2-1 in the fourth round of the EFL Cup.
The Hammers took the lead after just 11 minutes as Cheikhou Kouyate headed home from the edge of the box after a centre from Mark Noble.
And the second came three minutes after the interval as Edimilson Fernandes picked the ball up 20 yards out and arrowed a fine effort into the corner past Asmir Begovic.
Chelsea, who rested many of their top names, made changes in a bid to get back into the game but the Hammers prevailed despite Gary Cahill's consolation in the final moments.
Southampton will also be in the hat for the quarterfinals, with the draw made later on Wednesday, after winning 1-0 at home to Sunderland.
Sofiane Boufal scored the only goal of the game in the 66th minute, when he produced an outstanding shot from the edge of the box and found the top corner of the net.