Called Wilmina, the hotel occupies a duo of listed 19th-century structures in Charlottenburg that had been forgotten for decades prior to their renovation.
The former court, which sits at the entrance on Kantstraße, accommodates the hotel's reception as well as a temporary gallery called Amtsalon.
An extension housing Wilmina's restaurant connects the courthouse to the prison's U-shaped cell block, which fits 44 guest rooms across five levels including a new penthouse floor at the top.
Grüntuch Ernst Architects also added a roof terrace above the penthouse alongside a library, bar, spa and gym.
Interiors were designed to respect the buildings' existing architecture and reveal traces of their former use.
"The process involved reversing the spatial configuration and its meaning so that an anti-social space can become an inviting place," said the architecture firm, which was founded by husband-wife duo Armand Grüntuch and Almut Grüntuch-Ernst in 1991.
"Through sensitive interventions with deliberate openings, build-ups, superimpositions, relocations and penetrations, the existing structures were expanded, connected and reprogrammed."
Visitors enter the Wilmina via a bright lobby and journey deeper into the hotel through a sequence of courtyards, passages and rooms that become increasingly private.
In the hotel proper, narrow galleries with wrought-iron balustrades are wrapped around a central atrium, leading to the guest rooms that were set up in the former prison cells.
A lighting installation with glass pendants is suspended from the ceiling of the atrium to emphasise its height.
Although no two guest rooms are exactly the same, all of them are finished in light colours, soft textures and warm, tactile materials to create a soothing ambience.
Where possible, the cells' small high windows were enlarged to provide views into the main courtyard. But their prison bars remain intact to remind visitors of the building's history.
The new penthouse level features floor-to-ceiling windows that offer views down across the complex and its gardens. The new rooms are designed to be minimalist, clear and calm, with fine metal chain curtains that shimmer in the breeze.
At the centre of the site sits the hotel's restaurant Lovis in an extension constructed using bricks that were removed elsewhere during the prison's transformation.
The eatery occupies the site of the former lock yard, its old gates now replaced with large windows providing views of a small enclosed garden with rare ferns, vines, climbing plants and an old birch tree.
"The unique location and the detailed, sensitive transformation make the forgotten place a special experience in Berlin," said Grüntuch Ernst Architects.
"Wilmina is a place of discoveries, of surprising visual links, ambiguous layers of space and traces of the past. Wilmina is also a place of natural tranquillity, relaxation and comfort – an oasis in the middle of the city."
Meanwhile in London, EPR Architects and interior design firm Roman and Williams recently transformed the former Bow Street Magistrates Court and Police Station in Covent Garden into the first overseas outpost from American hotel brand NoMad.
The photography is by Patricia Parinejad.