“Tonight is a night myself and my family will always remember,” he said after the game.
Former Manchester United managers Sir Alex Ferguson, who signed Rooney from Everton on 31 August 2004, and David Moyes – who managed the England captain at both clubs – were present.
In addition, new England boss Sam Allardyce was also at Old Trafford to see Rooney, who has scored 53 goals in 115 appearances for his country.
Rooney was given a guard of honour as he emerged from the tunnel with his children Kai, aged six, Klay, three, and seven-month-old Kit to a red mosaic with the word ‘Rooney’ spelt out in the Sir Alex Ferguson Stand.
The former Everton player has scored 245 goals in 520 United appearances and is the club’s second-highest goalscorer.
Rooney has won five Premier League titles during his time at Old Trafford, as well as the Champions League, one FA Cup, two League Cups and the Fifa Club World Cup.
He will be trying to win the Community Shield for the fourth time with United when Jose Mourinho’s side face Premier League champions Leicester City at Wembley on Sunday.
Rooney has announced that all proceeds from his testimonial will go to disadvantaged children and young people across the United Kingdom.
Subscribe to the BBC Sport newsletter to get our pick of news, features and video sent to your inbox.