Almost 9,000 Rangers fans made the trip to the Midlands – boosting the attendance to almost 18,000 – and the crowd saw a fiercely contested game despite its status as a friendly.
Martin scored both goals in the second half before an off-the-ball incident involving him and Bilel Mohsni resulted in the Rangers defender being sent off.
Simon Dawkins, fit again after a hip injury, looked a threat all afternoon and should have put the Sky Bet Championship side ahead early on. The midfielder pounced on a mistake from Darren McGregor and went round the goalkeeper only to see Mohsni get back to clear the ball.
Rangers squandered an equally good opportunity after 14 minutes when Fraser Aird headed wide at the far post following a cross from former Derby striker Kenny Miller.
Dawkins was denied again on two occasions either side of half-time. He saw an effort blocked by Cammy Bell and his follow-up header then cleared off the line by Mohsni, before drilling a low shot against a post.
Shortly afterwards, though, Martin fired home from close range from a Dawkins cross to give Derby a 58th-minute lead.
And it was 2-0 in the 72nd minute as Martin latched on to a Will Hughes pass to beat Bell with a low strike.