Serbian 14th seed Ivanovic, who lifted the Suzanne Lenglen Cup in 2008, breezed through the opening set but dropped serve in the fourth game of the second on a chilly Parisian morning.
Martic levelled the tie with a smash, only for the world number 107 to collapse early in the decider on Court Philippe Chatrier.
Ivanovic showed signs of nerves too as she closed in on victory, losing three games in a row and wasting four match points.
She prevailed on the fifth occasion, though, when Martic sent a backhand long after one hour 50 minutes.
Next up for Ivanovic is either France's Mathilde Johansson or South African Chanelle Scheepers.
- Sports & Recreation