The phrase hedgehog's dilemma refers to the notion that:
(1) The closer two beings come to one another in a relationship, the more likely it might be for them to inflict psychological pain on each other
(2) Yet if they remain apart, they each might feel the roughly-equivalent (psychological) pain of loneliness.
This notion comes from the conjecture that hedgehogs, with sharp spines on their backs, might hurt each other if they get too close. It is a character trait believed to be possessed by some individuals, in real life as well as in works of fiction, sometimes causing anti-social behaviours, often allegedly caused by an unpleasant past experience of intimate relationships. A person who suffers from the hedgehog's dilemma will usually avoid becoming too close or involved with someone, due to fear of another similar, possibly painful, experience, such as they had experienced in the past.
Porcupines are a better example of the hedgehog's dilemma due to their commonly known dangerously sharp spines. As you can imagine, getting too close to them will provoke them and might force a few spines in you in self defense.