The 21-year-old played in the European Under-21 Championship in June, where Spain lost to Germany in the final.
He made 50 appearances for Spanish side Osasuna, before moving to Dortmund last summer, but only played nine times for the German club.
He becomes the newly promoted Premier League side's fifth signing this summer.
Manager Rafael Benitez has already signed Christian Atsu, Florian Lejeune, Jacob Murphy and Javier Manquillo during the transfer window.
Despite the lack of games for Dortmund, Benitez says Merino can improve during his time at Newcastle.
"He was signed as a young talented player and to be signed by a club like Dortmund shows that he has something good." Benitez added.
Merino said: "I know it's a great club and a really nice city. I had different options but I think this is the right place for me to play."