Peter Sutcliffe, the serial killer known as the Yorkshire Ripper, was told by doctors he was not going to live the day before he died last year.
Sutcliffe, 74, who changed his name to Peter Coonan in 2001, died in hospital in Durham, three miles away from HMP Frankland where he was serving a whole life term.
At an inquest hearing to assess progress in the investigation into Sutcliffe's death, Durham's Senior Assistant Coroner, Crispin Oliver, gave details of the cause of death.
He explained that Sutcliffe, a diabetic, had been admitted to hospital on 2 November 2020 for a heart pacemaker to be fitted.
This was described as an uneventful procedure with no complications.
However, his health continued to deteriorate, and he developed "increasing oxygen requirements". He tested positive for COVID-19 and was re-admitted to hospital.
The coroner went on to say that on 12 November, he was judged to be dying, and that after "some discussion with the patient" he was transferred to palliative care. He died at 1.45am on 13 November.
The post-mortem of Sutcliffe reported a main finding of "heavy, solid and airless lungs, characteristic of patients who have died from COVID".
The cause of death was recorded as being "due to SARS Cov2 pneumonia".
Mr Oliver said the post-mortem report explained that "age, diabetes and heart disease are well-known risk factors of COVID-19," and were "contributing conditions" in the death, which was by natural causes.
Sutcliffe's ex-wife Sonia had been notified of the hearing, but chose not to attend, either in person or via video link.
Sutcliffe was jailed in 1981 after being found guilty of the murders of 13 women in Yorkshire and the North West.
He began his killing spree by battering 28-year-old sex worker Wilma McCann to death on 30 October 1975.
He then avoided detection for years due to a series of missed opportunities by West Yorkshire Police to catch him, and eventually confessed in 1981 when he was brought in due to a police check discovering stolen number plates on his car.
The coroner is currently waiting for the publication of a report into Sutcliffe's death by the Prison and Probation Ombudsman before the inquest can continue. An initial report from the PPO is expected on 8 April.
The full inquest is scheduled to begin on 7 May.