Flaherty, 18, featured on a trial for the under-18 squad as Newcastle were beaten 3-0 against their Liverpool counterparts at the Kirkby Academy but almost netted a consolation for the young Magpies after hitting the crossbar.
Speaking about his move to United, the teenager told nufc.co.uk: "I'm buzzing to sign for Newcastle United. It is a massive club and when I heard they were interested, I just wanted to come up here and I'm happy to get everything sorted now. I can't wait to get started.
"I come up here for a week about a month ago and I really liked the place. I liked the staff and the players and there was a really friendly vibe at the Academy. The minute I came here, I felt welcomed.
"It was a good trial. I did a week's training which was good and then we played a match against Liverpool. The result didn't go too well as we lost 3-0 but, overall, it was a good week for me as I really enjoyed it here, which is why I was happy to come back.
"My main position is central midfield but I can also play as a number ten and off the wing. When you come up here and you see the likes of Sean and Matty (Longstaff) in the first-team, that is a big plus because you think maybe one day that could be you.
"I just want to get playing now so I'm really looking forward to it."