The midfielder has inked a five-and-a-half-year contract at St James's Park.
"I'm very excited to be here," Shelvey told United's official website. "I'm so glad that it's finally done.
"I drove up through the night to be here so it's been a manic 24 hours but it's all been worth it to come here and play for this great club."
The 23-year-old joined the Swans in 2013 after a three-year spell at Liverpool, who he linked up with as a teenager from Charlton Athletic.
Shelvy is the Magpies' second signing of the month following the arrival of Senegalese midfielder Henri Saivet.