Mr Humala, a leftist populist who has pledged to redistribute Peru's wealth, led by about five points over his two closest rivals, who were tied for qualification to the run-off election.
According to official results, Mr Humala garnered 29.6 percent of votes, while social-democratic ex-president Alan Garcia got 25 percent and conservative former lawmaker Lourdes Flores with 24.8 percent, with around three-quarters of valid ballots cast on Sunday counted so far.
The two candidates who gained the most votes will face off in a second round, to be held 30 days after the final results are computed.
Mr Humala is described as a hardcore nationalist who admires Venezuela's President Hugo Chavez.
He was initially expected to score at least 33 percent, but his popularity slipped as his rivals stepped up their attacks in the days leading to the vote.
Analysts described the pre-election campaigning as the most bitter they'd seen in Peru.
Allegations that surfaced during the electoral campaign accused Mr Humala of being responsible for the torture and "disappearance" of leftist government opponents in 1992.
The former lieutenant-colonel denies the claims.
He campaigned on a platform calling for redistribution of wealth and to punish corrupt politicians, as well as vowing to tighten state controls over the key mining and gas sectors, and to increase taxes on foreign companies' revenues.
He has also been vocally against the US-financed eradication of coca, a medicinal plant from which cocaine is derived.
Mr Humala led a failed military rebellion in 2000 and has lately become a controversial figure in Peru, loved by some, hated by others.
Second round looms
The two candidates who will make it to the second round now face arduous negotiations to reach alliances.
Should Ms Flores remain in the race, she will need to reach out to Mr Garcia's social-democratic APRA party.
Ms Flores, 46, who is backed by the business community, has battled claims she is the candidate of wealthy Peruvians.
A staunch Roman Catholic who opposes abortion, she had already made two unsuccessful bids for the presidency.
Mr Garcia on Sunday expressed certainty he qualified for the second round.
If he does make it, campaigning is certain to be marked by more personal attacks.
Mr Garcia, 56, has portrayed Mr Humala as a dictator in the making.
Mr Humala has repeatedly reminded voters of the shortcomings of Mr Garcia's 1985-1990 government, which was marked by hyperinflation and rampant corruption.
Mr Garcia narrowly lost to Alejandro Toledo in the 2001 presidential election held after former leader Alberto Fujimori fled to his ancestral Japan at the height of a corruption scandal.
All three leading candidates have pledged to fight for social justice, but it is Mr Humala who appears to have stirred the imaginations of the millions of impoverished Peruvians who often feel they have not shared in the country's economic growth.
His party unexpectedly garnered the most votes in the legislative elections, with projections showing it would have 43 mandates in the 120-seat Congress, with APRA, initially the favourite, getting 35.
