The 85-year-old Pope announced his decision in Latin during a meeting of Vatican cardinals on Monday morning.
"After having repeatedly examined my conscience before God, I have come to the certainty that my strengths due to an advanced age are no longer suited to an adequate exercise of the Petrine ministry," he told the cardinals.
"I am well aware that this ministry, due to its essential spiriual nature, must be carried out not only by words and deeds but no less with prayer and suffering.
Vatican spokesman, Federico Lombardi said: "The pope announced that he will leave his ministry at 8:00 pm (1900 GMT) on February 28."
The announcement was "a bolt from the blue", said Angelo Sodano, a senior Vatican cardinal.
The last time a pope resigned was in 1415.
Pope Gregory XII did so to end the Western Schism, at a time when there were three claimants to the papacy.
Before resigning, Gregory convened a council and authorised it to elect his successor.
Last year the Pope started using a cane on occasions and recently he appeared to have trouble reading the text of an address he delivered in Rome.
There was no immediate official comment from the Vatican.
In November last year, he declared that it is "beautiful to be old".
"The quality of a society, I'd say of a civilisation, is judged by how well it treats its elderly," the 85-year-old pontiff said during the visit to the home run by the Saint Egidio Community, a Catholic charity.
While it was "beautiful to be old", age brought challenges and difficulties with which he himself was familiar.
"I know well the difficulties, the problems and the limits of this age, and I know that these difficulties are aggravated for many people by the economic crisis," the Pope said.
More to follow.
VIDEO JUST IN FROM ROME!