Former Norwich striker Martin struck a deflected opener before adding another early in the second half to take his tally to 15 for the season and earn the Rams an eighth win from nine games.
Barnsley substitute Tomasz Cywka halved the deficit with 62 minutes played but Danny Wilson's struggling side failed to find an equaliser as their winless run stretched to five games.
The in-form visitors opened the scoring in the eighth minute when winger Johnny Russell's cross-field pass picked out Simon Dawkins on the left-hand side and he dribbled into the Barnsley box for striker Martin to take over and beat goalkeeper Luke Steele.
Steve McClaren's men continued to dominate possession early on and Scottish midfielder Russell shot narrowly wide from the edge of the box in the 13th minute after cutting in from the right.
The home side began to assert a bit of pressure at the other end and midfielder Stephen Dawson saw his shot on the turn deflected behind for a corner before defender Peter Ramage headed straight at Rams keeper Lee Grant from the resultant set-piece.
Chris O'Grady's partially-blocked strike from 20 yards then looped onto the roof of the net, while Tykes captain Martin Cranie glanced a header wide from 10 yards following Tom Kennedy's left-wing centre.
Rams midfielder Craig Bryson, looking to score for the fifth consecutive game, should have doubled the away side's advantage in first-half stoppage time but he hit his close-range effort straight at Steele with only the keeper to beat.
The visitors did not have to wait long for another chance and duly increased their lead four minutes into the second period.
Full-back Andre Wisdom made an energetic burst down the right and his whipped cross picked out the unmarked Martin at the back post for a simple close-range headed finish.
The Rams were threatening to run away with the match but, after narrowly failing to find the killer pass on a couple of occasions, Barnsley hit back just after the hour mark.
Polish midfielder Cywka, a former Derby player, showed trickery 25 yards from goal before rifling a low shot into the bottom left-hand corner past the despairing dive of Grant.
Cywka again threatened before his attempt was blocked by a last-ditch tackle, while midfielder Jim O'Brien drove in a powerful effort, which was saved by Grant.
Tykes' top-scorer O'Grady was presented with a golden chance to snatch a point in injury-time but he fired woefully over when unmarked 12 yards out as Derby held on.