Fans gathered outside the palace calling on 36-year-old Zamorano, who enjoys cult status in Chile, to reconsider.
"I have made the most important decision of my career, to say goodbye to soccer. A new life begins now," said Zamorano, known as Bam-Bam to his fans.
The player said Lagos deserved to be the first to know that he was retiring because he was a close friend.
Zamorano said he would now dedicate himself to philanthropic work through his own foundation and as an ambassador for the U.N.'s children's agency UNICEF.
"He has new goals to hit ... He told me that the most important goal is always the next one. His coming goals will be more difficult, more complex, and will mean a great service to Chile," said Lagos.
Zamorano shares the record for the most international goals for Chile with Marcelo Salas, both having scored 34.
Zamorano began his soccer career in Chile but made his name with Real Madrid and later Inter Milan, playing overseas for 14 years.
His last foreign club was Mexico's America, where he added another championship to his collection.
"Despite all the clubs I've played with, I feel that I'm a Chilean player. The national team has given me the greatest happiness and I feel I've worn the Chilean flag in fields all over the world. I always felt like a Chilean ambassador," Zamorano said.
The striker most recently played for Chile's best known club Colo Colo, but was banned for 11 matches earlier this month for hitting and insulting the referee during a stormy match against Cobreloa.
Newspapers had suggested for months that Zamorano's retirement was imminent and speculation intensified after the ban.