The Spain striker netted his first goal for the club ahead of the 2014-15 Premier League season as Jose Mourinho's men came from behind to defeat their Slovenian opponent.
The striker, signed from Atletico Madrid for 35 million pounds earlier this summer, raced onto a Cesc Fabregas pass before finishing well, while Kurt Zouma also netted as Jose Mourinho's men came from a goal down to record a hard-fought victory.
The hosts went in front five minutes before the interval, with Nik Kapun smashing past young goalkeeper Matej Delac after Darijan Matic's chested layoff on the edge of the area.
But Chelsea was level in the 56th minute as Costa ran on to a pass from another new signing — Cesc Fabregas — and thumped a finish high into the net.
MORE: Beautiful fans in Brazil | Barcelona's new bright kits | Juve's jerseys
And Mourinho's team was in front shortly after, with Zouma stabbing the ball home after Fernando Torres saw his shot parried back out into the danger area by Olimpija goalkeeper Aleksander Seliga.
There was a moment of controversy in the 66th minute as Chelsea thought it had extended its advantage. Seliga did brilliantly to tip Zouma's header onto the bar, with Branislav Ivanovic scuffing the rebound goalward.
The ball appeared to have crossed the line, with the help of John Terry, but the referee ruled the goal out, seemingly for what he felt was a foul by Chelsea's captain on the home goalkeeper, though it mattered little in the end as the Blues comfortably saw out their victory.
The Premier League club continues its preseason preparations against Vitesse on Wednesday.