The 20-year-old midfielder, who joined Newcastle's academy at the age of seven, has continued his rapid rise over the last two seasons and is now seen as a key part of Eddie Howe's plans for the future.
Miley has already made history at the club by becoming Newcastle's youngest appearance-maker and youngest goalscorer in both the Premier League and the Champions League. Despite injury setbacks during the campaign, he still managed 34 appearances in all competitions this season, taking his senior total to 80 matches.
Speaking after signing the new six-year deal, Miley admitted it was another proud moment in his journey with his boyhood club.
"I'm really pleased to sign this new contract and commit my future here," he said.
"It's a dream to be representing Newcastle United, so this is a proud moment for me.
"I'm really grateful to everybody who has played a part in helping me get to where I am today, especially the support of my family and the trust that the club has put in me from such a young age.
"It's been an amazing journey so far and I'm so excited for what's ahead. I'm now working hard every day to get back on the pitch."
Newcastle head coach Eddie Howe praised the midfielder's attitude and development, describing Miley as one of the easiest young players to manage.
"Lewis fully deserves his new contract as recognition for everything he has achieved over the last few years," Howe said.
"He's earned every opportunity and has proven himself to be more than capable of performing at the highest level.
"Players like Lewis are a dream to work with. Not only is he immensely talented, he's keen to learn and approaches everything with a brilliant attitude."
Howe also highlighted Miley's versatility and willingness to adapt to different roles in midfield as an important strength for the team moving forward.
"I'm really looking forward to seeing Lewis back in action next season and I'm confident he will continue to go from strength to strength," Howe added.