© Getty Images
The summer signing took just two minutes to get off the mark, charging forward from midfield before finding the back of the net from the edge of the box to make it 1-0 early on.
Having seen Ramires miss a sitter to put the Blues two up, Costa took matters into his own hands and added his second of the night, heading in from close range after Andre Schurrle's curled effort came back off the post.
Esteban Granero came closest to getting Sociedad off the mark in the first half with his curler from outside the box which swerved away from the target at the last moment.
Costa looked as though he would have the opportunity to round off his hat-trick before the interval after almost being picked out by Cesc Fabregas's long ball, but the pass had too much pace on it and Enaut Zubikarai safely collected.
Chelsea had shouts for a penalty turned down midway into the second half after Mikel Gonzalez appeared to handle the ball inside the box, but the referee disagreed.
Thibaut Courtois, who was given the nod over Petr Cech for this final pre-season friendly clash, was tested with 10 minutes remaining when Imanol Agirretxe drilled a low strike towards goal from the edge of the box, with the former Atletico Madrid man comfortably keeping it out in the end.
Chelsea face Burnley next Monday in their opening Premier League match.