An MRI scan at a Madrid clinic revealed that Costa had picked up a torn right thigh muscle during Atletico's 1-1 away draw against Villareal on Sunday, the club said in an online statement.
The injury delays Costa's long-awaited and controversial start for Vicente del Bosque's Spain squad.
"This injury will prevent him from accepting Vicente del Bosque's call-up for the Spanish national team for the games against Guinea and South Africa, for which he had been named," Atletico Madrid said.
"The striker will be on a sporting rest undergoing physiotherapy," the club said.
The Atletico Madrid man declared his intention to play for Spain, for whom he qualifies on residency grounds, and rejected a call-up from Brazil boss Luiz Felipe Scolari last month.