IranPress/America: Lula had been the frontrunner despite being in jail for a corruption conviction and despite the top electoral court barring his candidacy.
With the deadline for the registration of candidates only hours away, he threw his weight behind his Workers' Party colleague Fernando Haddad.
It has been a tumultuous election campaign dominated by Lula's legal battles and the stabbing last week of Jair Bolsonaro, the far-right candidate who is second in the polls behind Lula.
Lula was barred from running for the presidency under a 2010 law dubbed "Clean Slate". It prohibits those who have a criminal conviction which has been upheld on appeal from running for public office.
In July 2017, Lula was found guilty of accepting an upgrade to a beachfront flat as a bribe from an engineering firm involved in a major corruption scheme.
Lula has always denied any wrongdoing and appealed against the verdict. The appeal was rejected and Lula was given 24 hours to turn himself in.
From his cell, Lula has continued the legal fight against his conviction and the ban which prevents him from running for public office.
The election is on 7 October.
Read More:
Brazil judge blocks order to release Lula from prison
Brazil: two supporters of jailed ex-president Lula injured in shooting incident
Brazil: 'Free Lula!' Protests Continue in Sao Paulo, Belo Horizonte
Brazil judge orders ex-president Lula jailed by Friday