Argentina, needing a win to advance from the group stage, were handed the perfect start when a Qatari defender mistakenly passed the ball to Martinez at the top of the penalty area and the Inter Milan forward beat Saad Al-Sheeb to make it 1-0 inside of five minutes.
Aguero had a golden chance to double Argentina's lead, but he flashed his low shot wide of the goal from 12 yards away when he should have done better.
"When we scored the first goal we just needed to keep our calm until the end and we were qualified," Martinez said. "We were playing a good team, we couldn't make a mess of it.
"Now we need to stay focused and win the next game and keep progressing."
Argentina looked a different team after the break, coming out of the dressing room and fashioning much better chances than they did in the first half.
Qatar had Al-Sheeb to thank for twice keeping Aguero out in the first 20 minutes of the second half, once from close range with a reflex save and then tipping another shot from the Man City striker over the crossbar as Argentina looked to add to their narrow lead.
Argentina had another shocking miss 10 minutes later when Lionel Messi skied a wide-open shot from close range over the crossbar, but Aguero finally gave his side some breathing room in the 82nd minute, beating his defender and blasting a low shot past Al-Sheeb to double the lead.
"We played a good game and we won, and that was what mattered," Messi said. "We needed a game like this to gain some confidence and calm."
"As we play more games the team grows each one and that game was good for that."
The result eliminates Asian champions Qatar from the tournament after managing a single point in their opening group match against Paraguay.
Next up for Argentina, who finished second behind Colombia in Group C, is a quarterfinal match against Venezuela on June 28 at the Maracana in Rio de Janeiro.
Information from Reuters was used in this story.