John Kerry’s own goal from Neil Taylor’s left-wing cross gave previously unbeaten Swansea an 11th-minute lead, but Costa equalised on the stroke of half-time with a header from a right-wing corner.
He struck twice in 11 minutes to put Chelsea in control, polishing off a Cesc Fabregas cutback and a mis-hit Ramires shot, and Loic Remy made it 4-1 with a debut goal before Jonjo Shelvey replied for Swansea.
Brazil-born Spain international Costa now has seven goals to his name and is the first player to score in his first four Premier League games since Coventry City’s Micky Quinn in 1992.
“Diego Costa is one of the best strikers we have at this moment in football,” said Chelsea manager Jose Mourinho.