The 24-year-old, who made eight first team appearances for the Magpies after progressing through the ranks at St. James' Park, was released by his boyhood club in June.
Handed a Premier League bow by Rafa Benítez in May 2016, Sterry had loan spells with Coventry City and Crewe Alexandra either side of being part of United's Sky Bet Championship title-winning squad in 2016/17. He also played in several cup games for Newcastle, the last of which came in a 4-2 FA Cup win at Blackburn Rovers in January 2019.
South Shields joint manager Graham Fenton told the official South Shields website: "Jamie has been training with us for a prolonged period and we are extremely pleased that he has committed to joining the club.
"He has a strong pedigree in terms of the clubs he has played for and has really impressed myself, Lee Picton and Brian Smith during training sessions over the past couple of months, so we feel fortunate to have him as part of our squad."
Shields will be hoping to gain promotion this season from the Pitching In Northern Premier League.
Subject to receiving FA clearance, Sterry could make his debut in Saturday's Emirates FA Cup tie against FC Halifax Town at 1st Cloud Arena.