Rooney's future had been the source of speculation ever since Chelsea launched a bid to sign the striker last year.
With 18 months left on his previous deal, some of Europe's top clubs began to take an interest in the England striker, but on Friday night he committed his future to United until the end of the 2018-19 season.
After so much talk about the striker leaving Old Trafford, Moyes was ecstatic to keep hold of his star man.
"I am thrilled that we have got Wayne Rooney to stay," the United manager said.
"He has been fantastic
Everyone would want him in their team.
"There were clubs who did want him
There were clubs who would have wanted him (had he not signed a new deal) but there was never going to be a chance he was going to leave Manchester United, certainly not on my watch."
It was thought that Moyes' chequered history with Rooney would hinder the club's chances of renewing the contract of their star striker.
Moyes successfully sued Rooney for claims he made about the Scot in his autobiography in 2006, but the pair have since buried the hatchet.
Productive negotiations started gathering pace at the start of the year and a verbal agreement was reached earlier this week.
On Friday, Rooney finally signed the contract, which Press Association Sport understands to be worth a whopping ?300,000 a week.
The news is a welcome boost for United fans, who have seen their team slip 11 points off the pace in the hunt for Champions League football.
Moyes started rebuilding his squad in January by signing Juan Mata for a club record ?37.1million
Now with Rooney's future assured, the United boss is looking to add further faces to the ranks.
"Wayne is a great player and hopefully we can keep him at the really high level which he has shown this season," said the Scot, who has been promised funds for at least three major signings this summer.
"Part of the rebuilding (process) is making sure that you keep the players you really want to keep.
"We are looking to bring the best players in the world to the club
I think Wayne Rooney is one of them.
"I will be looking to make more signings in the summer and hopefully add to the quality we already have got."
The striker has scored 11 goals during a season in which he has been hindered by injury.
When at his best, there is no questioning how important Rooney is to United, though.
The England forward has scored 208 goals in 430 appearances for the club and is viewed by many inside the club as the best man to replace the departing Nemanja Vidic as captain come the end of the season.
United fans hold Rooney in high regard despite the fact that he asked to leave the club in 2010 and - according to Sir Alex Ferguson - again last season
Rooney has always denied he submitted a second transfer request.
The Merseysider, who joined United from Everton in 2004, could now spend the rest of his days at Old Trafford and he will also be keen to beat Sir Bobby Charlton's record of 249 goals for the club.
Source : PA
Source: PA