Speaking to hundreds of inmates, guards and staff at the Rebibbia prison on the outskirts of Rome, Francis said he wanted to open the door, part of the prison chapel, and one of only five that will be open during the Holy Year, to show that "hope does not disappoint".
"In bad moments, we can all think that everything is over," the pontiff said on Thursday.
"Do not lose hope. This is the message I wanted to give you. Do not lose hope."
Francis opened the Catholic Holy Year, also known as a Jubilee, on Tuesday.
A Catholic Jubilee is considered a time of peace, forgiveness and pardon.
This Jubilee, dedicated to the theme of hope, will run through January 6, 2026.
Holy Years usually occur every 25 years, and usually involve the opening in Rome of four special "Holy Doors", which symbolise the door of salvation for Catholics.
The doors at the papal basilicas in Rome are only open during Jubilee years.
The Vatican said the opening of the "Holy Door" at Rome's Rebibbia prison was the first time such a door had been opened by a pope at a prison since the start of the Jubilee year tradition by Pope Boniface VIII in 1300.
Francis has shown special attention for the incarcerated over his 11-year papacy.
He often visits prisons in Rome and on his foreign trips.