The Juventus striker was drafted into Vicente del Bosque's squad for the upcoming friendlies against Equatorial Guinea and South Africa after Costa withdrew due to a leg injury.
Brazil-born Atletico Madrid frontman Costa was expected to make his debut after opting to play for the world and European champions rather than his country of birth.
But his absence opened the door for Llorente, who has scored in his last two appearances for Italian champions Juve.
The former Athletic Bilbao talisman said: "I’m very happy to be back, I did not expect it and I was caught by surprise.
"Now it is very difficult to be here, I have to fight a lot, but the year is long and there is time to prove myself.
"It is always a joy to return to the national team. I have had a normal period of adaptation at Juventus and now I feel fully settled.
"What I thought was to try to adapt as quickly as possible knowing that this was normal, that it would be tough, but that in the end things would work out with the work I was doing."
Spain face Equatorial Guinea in Malabo on Saturday and South Africa in Johannesburg three days later.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.