The Spanish forward has signed a three-year deal and is Newcastle's sixth senior summer signing.
Manager Rafa Benitez told nufc.co.uk: "We have known Joselu since his days at the Real Madrid Academy, and we know that he has the potential to do well for us. He's keen to come and fight for a position in the team."
Joselu has made 22 Premier League appearances since moving to England with Stoke from Hannover in 2015.
The 27-year-old could make his Newcastle debut at Huddersfield Town on Sunday 20 August.