Rooney had just 18 months left on his previous deal and was a transfer target for Chelsea last year, sparking speculation he could leave at the end of this season, but the England striker has agreed to extend his stay at Old Trafford until June 2019.
The new contract will reportedly pay the 28-year-old STG300,000 ($A557,000) a week, with Rooney also set to stay at United as a club ambassador when he eventually retires.
"Wayne Rooney has committed his future to Manchester United by signing a four-year contract extension, keeping him at the club until June 2019. Wayne will also become a club ambassador when he retires from the game," a statement on United's website announced.
Earlier, at his weekly media conference, United manager David Moyes deflected speculation about the 28 year old's future.
"Everyone knows how important a player he is. He's a terrific footballer. If we can get it done, that will be great."
Meanwhile, United face Crystal Palace at Selhurst Park on Saturday and Moyes has been impressed by the job that Tony Pulis has done since he replaced Ian Holloway as manager.
Palace have moved from six points off safety to 15th place in the table, winning seven out of 15 matches in all competitions, since Welshman Pulis took over.
"Results are what matter and you have to think about where Crystal Palace were and where they are now. What matters to Tony is results and he's very good at getting them."
United are expected to recall youngster Adnan Januzaj at the expense of winger Ashley Young and Moyes could also hand a start to fit-again midfielder Marouane Fellaini for the first time since early December.
The Premier League champions are also expected to recall defenders Rafael da Silva and Phil Jones, who have both recovered from concussion.