The 24-year-old Academy product has made almost 100 appearances for his boyhood club since Rafa Benítez handed him his debut in August 2018, and Eddie Howe was keen to secure the services of a player who started four of the final five games of the season just ended.
Born and raised in North Shields, the elder brother of Magpies team-mate Matty follows Fabian Schär and Paul Dummett in signing new deals at St. James' Park in recent weeks.
Sean Longstaff said: "I'm over the moon. To sign for three more years at your hometown club - especially with the way the club's going and what the owners are putting in place - is really special for me and my family, and a day I'll never forget.
"You need to be in the right place to learn and keep improving, and since the first day the new manager's come in, I've loved every second of working with him."
He added: "Being able to work with him every day, and his staff, they always want to help you get better and I think that's the biggest thing for me. I speak to the manager loads, and he's assured me that he wants to keep helping me improve and the goals he thinks I can achieve.
"They align with what I think I can achieve as well. It's really special. Everyone is moving in the same direction and I'm looking forward to being a part of it."
Eddie Howe added: "It's great news that Sean has committed his future to the club. He is a great professional and an outstanding player who is incredibly passionate about playing for Newcastle United.
"His attitude and commitment since I arrived have been first class on and off the pitch and he played a big part in us climbing the table and finishing the season as strongly as we did.
"At 24, he has his best years ahead of him and I'm excited to see his development continuing."