The Magpies are understood to have triggered the £3m release clause in the 26-year-old's contract, bringing an end to his one-season spell with Depor.
Schar was used 28 times in La Liga last season and also featured a further three times at the World Cup finals this summer with Switzerland, before missing his side's last-16 defeat to Sweden through suspension.
Speaking to his new club's official website, the defender said: "I'm really happy to be here. The club is a really big club for me. It has a big name, and it is a brilliant chance for me.
"I'm not like a typical defender. I, of course, defend, but I'm quite good with the ball – I like to play, I want to build up the game from behind, and I think that is a strength of mine. I have also scored some headers – that could also be a strength and hopefully I can use it here.
"I hope to start training with the team soon, and I'm looking forward to everything that's coming. At the moment, I just want to get started."
Manager Rafael Benitez added: "I'm really pleased to welcome Fabian to Newcastle United. He is an international, did well in the World Cup and has great experience. He adds competition in this position and that is a positive for the team."
Newcastle have also signed goalkeeper Martin Dubravka on a permanent deal from Sparta Prague, Ki Sung-yueng on a free contract and Chelsea winger Kenedy on loan, with exactly two weeks to go until the window closes.