Election officials finally declared that Garcia, a social democrat, had edged the conservative candidate Lourdes Flores into third place after the first round of voting on April 9.
The announcement on Wednesday came after almost all ballots had been counted.
"The remaining ballots will not produce any variation in the final results," said Enrique Mendoza, the head of Peru's electoral board.
Garcia's presidency from 1985 to 1990 was infamous as being a period of hyperinflation and a time when the violent Shining Path rebels were particularly active.
He has continually claimed to have learnt his lessons during this year's campaign and will now go head to head with the 43-year-old Humala, who won the most votes in the first round.
Humala is a relative newcomer to Peruvian politics.
A left-wing former army lieutenant colonel, he has pledged to rewrite contracts with Peru's mining companies and bring more of the economy under state control if elected to office.
His candidacy is backed by Hugo Chavez, the populist Venezuelan president, who denounced Garcia as a "thief".
With 99.97% of the votes counted, Humala led the first round with 30.62% but a recent poll showed Garcia winning the runoff.
The Datum institute poll gave the ex-president a 54 to 46% lead.
The two are vying to succeed President Alejandro Toledo, whose five-year term ends in July.