Alexandre Lacazette’s powerful late winner proved the difference in a contest full of attacking quality and defensive fragility.
The Gunners led twice, through Shkodran Mustafi’s header and a curling effort from Pierre-Emerick Aubameyang, before Lacazette crashed home the winner on 81 minutes.
Victor Camarasa’s first Cardiff goal, on the stroke of half-time, and Danny Ward’s header had seemed as though they would earn Neil Warnock’s side a point as they scored their first goals of the league campaign.
Arsenal manager Unai Emery this week denied reports that he had fallen out with midfielder Mesut Ozil after the former Germany international withdrew from the squad that beat West Ham last weekend, citing illness.
There have been suggestions Ozil’s style does not fit with a manager who demands high-energy pressing from his forwards, but Ozil started in an attacking-looking line-up that paired Aubameyang with France striker Lacazette up top.
Ozil and former Cardiff favourite Aaron Ramsey were given licence to roam in behind, and for large periods in the first half, Arsenal’s shape and roving full-backs troubled Cardiff.
Emery’s side took the lead on 11 minutes with a goal that will have left Warnock incredulous as Mustafi headed home, unopposed, from Granit Xhaka’s corner.
But for a wonderful save from Neil Etheridge, who denied Nacho Monreal from point-blank range, the Gunners might have given Cardiff a mountain to climb inside 20 minutes.