The 29-year-old moved to St. James' Park from Stoke in 2017 but found first-team opportunities hard to come by.
A former Spain Under-21 international, Joselu hit seven goals in 52 appearances for the Magpies but featured just 17 times across all competitions last season.
He returns to LaLiga with Alaves for an undisclosed fee, having previously turned out in Spain for Celta Vigo, Real Madrid and Deportivo La Coruna.
While he had fallen down the pecking order at Newcastle, Joselu's departure means further depletion to the attacking options available to the new manager.
Salomon Rondon was the club's player of the season last year but was on loan from West Brom, while Ayoze Perez has been sold to Leicester.
That leaves just Dwight Gayle, back after joining West Brom in a loan switch with Rondon, and Yoshinori Muto as the main forward choices.