1. Literally, in a court of chancery, which is the Lord Chancellor's court (in the UK) or a court of equity (in the US). I'm in chancery today, waiting for the decision in our case to be announced.
2. Faced with a hopeless or challenging situation. I'm in chancery here, trying to fix my car on the side of the road with no clue what to do!