The result hung in the balance right to the final whistle as the hosts sought to overturn a single-point deficit, but ultimately they were unable to convert pressure into points and repeat the win they had posted in the reverse fixture earlier in the campaign.
The visitors owed their victory to an impressive man-of-the-match performance from Rhys Patchell, who created a try for Michael Paterson and was on the mark with four penalties.
The hosts bagged a try through Willem Nel, converted by Gregor Hunter, who also booted two penalties, while his replacement Harry Leonard slotted one.
Patchell struck the opening points of the match after five minutes when he stroked over a close-range penalty following an offence at a scrum. And he doubled Cardiff's lead with a second strike from a similar distance on 13 minutes.
Edinburgh created the best try-scoring opportunity of the first quarter but a wayward pass by Dave Denton missed out his supporting colleagues and the ball trundled into touch.
Hunter, who had missed with two earlier efforts from long distance, found the target at the third time of asking to trim the deficit, but Patchell responded immediately in kind to restore a six-point gap. And the kicking battle continued with Hunter again wide of the mark before landing his next effort.
Patchell showed that there is more to his game than a trusty boot when he evaded two Edinburgh defenders as he drifted into the home 22 then offloaded to Paterson, who plunged over at the corner for an unconverted try that sent the Welsh side in at the break with a 14-6 advantage.
The home team made a lively start to the second period and deservedly grabbed a try in the 49th minute when Dougie Fife carried the ball into contact where Nel was on hand to pick up and force his way over. Hunter converted before making way for Leonard whose first task was to kick the penalty that edged Edinburgh into the lead for the first time.
Cardiff's response was a slick handling move that yielded a penalty which Patchell booted to move the visitors in front once more.
Edinburgh mounted a series of attacks but a string of errors in sight of the line proved expensive and the fatal blow came when Cardiff stole a lineout on the edge of their own 22 in what proved to be the final play of the game.
- Sports & Recreation