Defender Schar, in the team as Rafael Benitez's only change from last week's loss to Chelsea, had not scored since November 2017 while playing for Deportivo La Coruna, but produced a crucial double on Saturday.
He netted in both halves and Ayoze Perez put the icing on the cake in stoppage-time, meaning Newcastle move back out of the drop zone after dropping into it last weekend.
They are replaced in the relegation places by a poor Cardiff side who did not even register a shot on target until the 72nd minute.
Newcastle made the stronger start, with Perez's header impressively tipped over by Neil Etheridge, before the forward had a penalty claim turned down for handball against Joe Bennett.
The breakthrough arrived after 24 minutes, and it was not a goal you would expect from a centre-back. Schar collected a pass from Isaac Hayden 40 yards from goal, beat Cardiff debutant Oumar Niasse, ran completely unchallenged into the box and stroked a cool left-footed effort into the far corner from 12 yards.
Victor Camarasa unleashed a powerful strike that had Martin Dubravka briefly worried before flying over, but the visitors did not muster a first-half shot on target.
Perez was foiled by Etheridge again early in the second period, the goalkeeper saving at close range as the Spaniard stayed on his feet despite coming under heavy pressure from Bennett.
But Newcastle were not to be denied in the 63rd minute, Schar converting from inside the six-yard box after latching on to a headed flick on from defensive colleague Jamaal Lascelles, who had met Matt Ritchie's corner.
Schar even had a chance for a hat-trick, heading narrowly wide from another Ritchie delivery shortly before making a key interception at the other end.
Bruno Ecuele Manga's header ensured Dubravka was finally tested for the first time, but Cardiff never threatened a comeback and Perez tapped in three minutes into added time after superb work from Salomon Rondon to set him up.
As well as moving out of the relegation zone, a home win was vital for Newcastle's morale after a tough campaign at St James' Park. They had only two wins and seven goals from 11 home league games coming into the match, but Benitez will hope this can change the momentum in their battle against the drop.
Cardiff had only lost once in four games coming into the match, keeping three clean sheets, but an abject display at both ends of the pitch sees them seeking answers once again, with only one win from 11 matches on the road.
Supreme Schar lifts Newcastle mood
Schar's two goals were very different – with his second more scrappy than the excellent first – but he will not care. He also helped Newcastle to a valuable clean sheet, registering five clearances.
Not good from Niasse
Niasse did not have the Cardiff debut he would have hoped for.
While he was not signed for his defensive qualities, he failed to track Schar for the opener, and at the other end he did not register a shot or create a chance for his team-mates before being replaced by Bobby Reid after Newcastle's second goal. He only touched the ball once in Newcastle's box.
Key Opta Facts
- Newcastle have won their last 10 home league games against Cardiff – only against Bolton have they had a longer run in their history (11 between 1898 and 1914).
- Newcastle scored three goals in a Premier League game for the first time this season, last doing so against Chelsea on the final day of the 2017-18 campaign.
- Cardiff have failed to score in a league-high 11 different Premier League games this season.
- Schar became the first defender to score twice in a Premier League for Newcastle since Philippe Albert against Manchester City in February 1996.
Newcastle are on FA Cup duty next Saturday with a home tie against Watford, before a daunting home clash against Manchester City on January 29, which is the same day as Cardiff return to action with an away top-flight game against Arsenal – not an ideal fixture as they look to provide an answer to this poor performance.