Argentina captained by Lionel Messi came second in Group B with four points, behind Colombia that lashed them 3-0 in the first game of the tournament.
Colombia topped the group with nine points, winning all their three matches against Argentina, Paraguay and Qatar.
Martinez scored in the 4th minute and Sergio Aguero’s late second gave Argentina a 2-0 win over Qatar.
Already-qualified Colombia beat Paraguay 1-0 in the other Group B match to secure a place in the last eight for both Peru, who finished third in Group A, and Uruguay, currently second in Group C.
Argentina will next play Venezuela at Rio de Janeiro’s iconic Maracana stadium in the quarter-finals, while tournament debutants and guests Qatar are out.
Paraguay, on two points, must wait and see what happens in Monday’s Group C clash between Japan and Ecuador before finding out if they qualify as one of the two best third-place finishers.
Peru, with four points, are sure of that while only a draw between Japan and Ecuador would see Paraguay progress.
Argentina coach Lionel Scaloni recalled Manchester City forward Aguero for the crunch tie while Martinez kept his place at the expense of Angel Di Maria.
Asian champions Qatar made a calamitous start when a weak headed clearance from Tarek Salman fell to Martinez 12 yards out, but the Inter Milan forward sent his volley over the top.
He didn’t have to wait long for another chance though as Bassam Hisham played a ball across his box and straight to the feet of the Argentina forward, who scuffed a shot into the bottom corner after just four minutes.
“The goal came early and that allowed us to approach the game with greater calmness,” said Martinez.
“There was pressure, we had to win to progress and we’re happy. Now we have to work hard.”
With the weight was lifted from Argentina’s shoulders, they played with a freedom expected of a side boasting talents such as Aguero and five-time Ballon d’Or winner Lionel Messi.
Qatar played with limited ambition but their talented forwards looked dangerous when they did venture into the final third.
Hasan Khalid Al Haydos got in behind the Argentina backline and tried to chip Franco Armani but the goalkeeper got a touch to divert the ball behind, although the linesman’s flag was up and it wouldn’t have counted.
“We paid for inexperience, we started two matches by conceding goals from unnecessary actions,” said Qatar’s Spanish coach Felix Sanchez, alluding to their opening tie against Paraguay when they also conceded in the fourth minute.
“We played a great team that knew they had to win, they took their first chance really well. It was our mistake.”