This is a side quest you can receive while completing the main quest "Echoes of Silenced Bells." To unlock it, talk to the soldiers inside the Infirmary through the window located at the back of the building.
Seems I'm not the only one looking for something in this cursed place. I came across some of Brencis's men, sent here to retrieve St. Tyna's necklace. They offered to open up a safe passage to the library in exchange for the relic. Something to think about.

1. Fulfil soldier's request to secure a passage to the library
Here's the deal: I bring back the relic, Brencis's men let me access the library. Something to consider...
The soldiers have a proposition for you - if you bring them a certain relic, they will open the back entrance to the Infirmary for you.
1.1. Search for the relic in the chapel (1 Time Segment)
In order to convince Brencis's men to let me use the passage to the library, I need to give them St. Tyna's relic. The chapel seems a good place to start searching for it.
Head to the chapel, sticking to the edge of the courtyard to slip past the zombie sisters. Inside, locate and pick up two items - the rosary...

...and the prayerbook.

Use them when performing compel soul on the corpse of the sister lying in the chapel. Doing so will reveal the location of the relic, which is not inside the chapel itself.

1.2. Search for the relic in the sacristy
I found clues suggesting the relic was hidden in the sacristy. Let's see if it's still there.
Exit the chapel and head to the building containing the sacristy. When you try to open the door, you will find it locked - you need a key to open it.

1.2.1. Search for keys to the sacristy
The sacristy is locked - which is frustrating. But each lock has a key and, sooner or later, I'll find it.
If you want extra, completely optional information on where to find the key, look for a note on the top floor of the building to the left of the sacristy (you can only get there at night, as it requires vampire abilities).

1.2.2. Search for keys in the caretaker's shed
Looks like the keys I'm searching for are in the caretaker's shed. I need to find it and take a gander.
And the easiest way is to simply go around the left side of the sacristy building to avoid running into the zombie sister, then head inside the caretaker's shed located there.

The Monastery Keys are hanging on the wall.

Return to the sacristy, step inside, and examine the nun's corpse. Simply inspect the necklace around her neck.

2. Collect relic from the nun's body
I found the relic... Question is, do I have the nerve to pry it from the cold fingers of the nun who died protecting it.
Simply collect the relic.

3. Return to the soldiers
Now that I've collected St. Tyna's relic, I could trade it for a safe passage to the convent library.
You can now return to the window where you spoke with the soldiers to inform them that you found the relic. You will be given two choices.
You can hand over the relic, and they will open the door for you and leave the infirmary. Reward: 150XP
Alternatively, you can keep the relic for yourself. If you do, the soldiers will head outside, forcing you to kill them.

There is also another way to get rid of the soldiers. If you know how to ring the bell in the bell tower (see the "Echoes of Silenced Bells" quest walkthrough), ring it so that the zombie sisters head to the Infirmary. They will kill the soldiers, leaving the relic for you without having to fight them yourself.
3.1. Defeat the soldiers
Me and Brencis's men have had a disagreement - one we have to settle with swords.
If you decide to keep the relic for yourself during your conversation with the soldiers, you will have to kill them. You will find the Infirmary Key on the body of one of them.

4. Endings
If you handed the relic over to the soldiers:
I decided to take the soldiers up on their offer - and they held up their end of the bargain.
If you killed the soldiers:
The soldiers made me an offer - and I came back with a counterproposal. Now that they're dead, the passage to the library stands wide open.