Garcia, 57, a former president whose term in office from 1985-90 was widely considered disastrous, had more than 55 per cent of the vote with more than 77 per cent of ballots counted from Sunday's poll.
He succeeds the wildly unpopular President Alejandro Toledo for a five-year term.
Humala, 43, a former member of the military with authoritarian leanings, had nearly 44.5 per cent of the vote, despite being the top vote-getter in the first round of elections in April.
'We recognize the (official) results ... and we salute the forces that competed against us, those of Mr Garcia,' Humala told a news conference.
The actual results closely followed exit polls released after the close of voting stations.
Garcia declared victory in Lima at a rally of tens of thousands of supporters and thanked God for what 'appears to be a victory by the party of the people.'
He promised an 'austere and thrifty' administration and warned that for the next five years we must guard against 'craving power.'
Garcia, who presided over a shrinking economy and runaway inflation during his first administration, has promised to fight poverty, a challenge with more than half of Peru's 27 million people living below the poverty line.
Though Humala had support among the lower class, his campaign was eyed with suspicion among the upper and middle classes.
Humala, who has never held elected office, sought to stir up poor Peruvians against the wealthier classes. Observers said that Humala was hurt by an endorsement from Venezuela's leftwing nationalist President Hugo Chavez.
Garcia, who was clear about rejecting the 'backward socialist model' of Chavez, also benefited in the second-round vote by having supporters of Lourdes Flores, the third-place finisher in April's first round, flock to him instead of Humala.
García stands with other moderate left leaders in South America - including Chile's Michelle Bachelet, Brazil's Luiz Inacio Lula da Silva and Argentina's Néstor Kirchner - for a free-market economy.
Humala, who has been accused of severe human-rights violations as a member of Peru's military during the civil war against the maoist Shining Path (Sendero Luminoso) rebels, campaigned on aggressive nationalism including a more centralized economy, while steering a more rightwing path on domestic security.