Martin missed a penalty but responded by heading his 19th goal of the season.
That was after Scott Malone’s own-goal had given Derby a lead at the Cardiff City Stadium that they rarely looked like surrendering.
A fourth defeat in a row for Cardiff leaves them well off the pace for the play-offs and now looking nervously over their shoulders, just seven points off relegation.
Derby arrived in south Wales under pressure to take all three points after watching promotion rivals Bournemouth and Middlesbrough both win in earlier kick-offs.
So Steve McLaren will have been hugely satisfied to lead 2-0 at half-time and it could easily have been more despite the Rams not even hitting full stride.
They looked to have grabbed an early breakthrough when Martin was fouled by Aron Gunnarsson following a scramble in the box from a corner as early as the ninth minute.
But the Scotland striker, who had netted 18 times this season, surprisingly lacked conviction with his penalty and his shot was easily saved by Simon Moore’s right arm.
However Martin swiftly made amends soon after by helping set-up Derby’s opener of 22 minutes.
Will Hughes directed affairs for the Rams in midfield all game and it was his direct ball to Martin that began the move. Martin’s flick released Jeff Hendrick who pushed play out to Jamie Ward.
The right-winger drove a low pass into the danger-area but it was the deflection off Malone that wrong-footed Moore.
It was yet another blow for Cardiff’s players who had lost their previous three games and did not manage to muster a shot on target until the 33rd minute with Alex Revell’s effort from the edge of the box.
McLaren was forced to re-shuffle his backline when influential defender Jake Buxton limped off but they still managed to strike next before half-time.
Cardiff were guilty of standing-off Derby who capitalised on the free space. Ryan Shotton pressed forward and Hughes had plenty of time to find Buxton’s replacement Cyrus Christie galloping down the right-hand side.
Christie’s cross was met at the far-post by Martin who leapt above Cardiff’s new-signing Lee Peltier to head past Moore from close range in injury-time.
Hughes was booked on the stroke of half-time but Derby were in utter control and had not, by their own high standards, hit top form.
Cardiff captain Gunnarsson summed up his side’s frustration when he was shown a yellow card early in the second half before Derby’s Mason Bennett followed with his first touch after stepping off the bench.
The hosts only looked a genuine attacking threat when Kenwyne Jones came on after an hour.
The striker was left on the bench despite scoring six goals in his last eight appearances but forced a save from Lee Grant with his first touch, heading Craig Noone’s cross on target.
Derby should have grabbed a third only for Bennett to be denied by Moore but it was to be a comfortable three points for the visitors.