Costa left for Spain's training camp following Sunday's 3-2 win at Hull City in which he appeared to tweak his troublesome hamstring after scoring Chelsea's second goal.
However, the former Atletico Madrid man has been diagnosed with a grade one hamstring tear and will miss Spain's European qualifier with Ukraine and their friendly against the Netherlands.
"Spanish international forward, Diego Costa, left the premises of the Spanish Football Federation this morning after undergoing several tests with the medical services of the RFEF," read a Spain statement.
"The strikers suffers a level 1 hamstring tear on the biceps femoris of the left thigh, which was previously already noted by the medical services of his club, whereby the Medical staff at the RFEF recommend him not to take part in the National Team's next matches against Ukraine and the Netherlands.
"Diego Costa will return to Chelsea FC where he will undergo the corresponding medical treatment."
Vicente del Bosque called up Malaga forward Juanmi on Monday as a precaution, should Costa be forced to pull out.
Costa - who opted to play for Spain over Brazil - made his debut for the European nation in March last year and scored his first goal against Luxembourg in October.
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.