Manchester United manager Jose Mourinho and his Manchester City rival Pep Guardiola were dealt an English Football League Cup rendezvous after both teams came through their third-round ties on Wednesday.
"We deserved to win," Mourinho told Sky Sports after goals from Michael Carrick, Ander Herrera and substitute Marcus Rashford took his side into the fourth round.
Mourinho, speaking before the draw had been made, added: "It was difficult, as I was expecting, but we were totally in control for the 35 minutes and then for the last 45 minutes.
"It was a difficult match, but overall a positive performance."
Rooney started up front, for the first time since last season, and squandered an early opportunity by miscuing from Ashley Young's cross.
United went ahead in the 17th minute after Northampton goalkeeper Adam Smith was penalised for picking up a back-pass.
Rooney's shot from the ensuing free-kick hit the wall, but Carrick swept the rebound into the top-left corner from the edge of the box.
Rooney then saw a goal ruled out for offside, but Northampton gave United a scare when Kenji Gorre clipped the bar in the 38th minute and within four minutes the home side were level.
Mourinho waited only 10 minutes in the second half before turning to the bench, with Zlatan Ibrahimovic and Rashford replacing Fosu-Mensah and Depay.
Herrera gave Northampton a warning with a left-foot shot that struck the post and in the 68th minute, he restored United's lead, slamming home right-footed from Rashford's lay-off.
Another Smith error allowed United to seal victory, the goalkeeper hesitating as a long ball bounced towards him, which allowed Rashford to steal in and lash the ball into the vacant goal.
Premier League pace-setters Manchester City made it nine wins from nine games under Guardiola with victory at Swansea.
City enjoyed the best of the first half, but it took until four minutes into the second half for Gael Clichy to put them ahead with a deflected shot.
Aleix Garcia made the most of a rare start by netting the second from Jesus Navas's cut-back in the 67th minute before Gylfi Sigurdsson stabbed in a stoppage-time consolation for Swansea.
"The doctors are speaking with him and seeing what's up," Guardiola said.
"Hopefully, it will not be a big problem. We're going to wait for the results from the doctors."
Tottenham cruised through after crushing League One Gillingham, with Christian Eriksen scoring twice and Vincent Janssen and Josh Onomah scoring their first goals for the club.
Erik Lamela was also on target.
West Ham, struggling for form in the Premier League, needed a 96th-minute Dimitri Payet free-kick to edge fourth-tier Accrington Stanley 1-0 at London Stadium.