The 23-year-old looked close to leaving United towards the end of last season having struggled to secure a regular role during Mourinhos reign at Old Trafford.
But Shaw has been one of Uniteds best players this season and his performances have been rewarded with a new five-year deal, which also has the option of a further year.
Luke fully deserves this contract, Mourinho told Uniteds official website.
He understood his development process, he has worked really hard at every level and he always believes in himself which is a great attribute to have.
Luke is still young and is improving all the time and he must feel very proud of himself.
I am delighted that we are keeping such a talented young English player with a bright future ahead of him.
Mourinho and Shaw clashed seven months ago when the United manager substituted the defender at half-time during their 2-0 win over Brighton.
Shaw is alleged to have asked Mourinho: Why are you always picking on me?
But Mourinho did not hold back in his criticism of Shaw after the game.
I decided [to substitute] Luke because Antonio [Valencia] was at least capable defensively, said the United boss.
Every player can play bad but when you see please Mr, take me from the pitch. That is what I thought.
Shaw, however, was keen to make a better start this season and even took Gary Walker, one of Uniteds strength and conditioning coaches, on a holiday with him to Dubai this summer.
More: Manchester United FC