The striker was a doubt going into the European encounter and lasted less than 30 minutes at Camp Nou, while the hosts also saw Gerard Pique forced off
The 25-year-old, who has never scored against the Catalans, was a major doubt going into the quarter-final tie with an unspecified problem but Rojiblancos coach Diego Simeone named the forward in his starting XI for the first-leg clash at Camp Nou.
However, that decision backfired in the 27th minute when Costa pulled up in obvious discomfort. Although Simeone seemed to try to convince his player to play through the pain, immediate medical treatment was unsuccessful and team-mate Diego Ribas replaced the Spain international with a third of the game gone.
Atletico confirmed in a statement on their Twitter account: "Diego Costa suffered a hamstring muscle injury in his right thigh."
It is currently unclear how long Costa will be out of action for but he is already a major doubt for the second leg at the Vicente Calderon in a weeks' time.
Meanwhile, Barcelona were forced to withdraw centre-back Gerard Pique 15 minutes into the game against Atletico.
The Blaugrana later revealed that the defender, who was replaced by Marc Bartra, had taken "a knock to the pelvis".