The phrase hedgehog’s dilemma refers to the notion that the closer two beings come to each other, the more likely they are to hurt one another; however if they remain apart, they will each feel the pain of loneliness.
This comes from the idea that hedgehogs, with sharp spines on their backs, will hurt each other if they get too close.
This is analogous to a relationship between two human beings. If two people come to care about and trust each other, something bad that happens to one of them will hurt the other as well, and dishonesty between the two could cause even greater problems.
The concept originates from Arthur Schopenhauer’s Parerga und Paralipomena, Volume II, Chapter XXXI, Section 396. In his English translation, E.F.J. Payne translates the German “Stachelschweine” as “porcupines”. Schopenhauer’s parable describes a number of hedgehogs who need to huddle together for warmth and who struggle to find the distance where they are warm without hurting one another. The hedgehogs have to sacrifice warmth for comfort. The conclusion that Schopenhauer draws is that if someone has enough internal warmth, he or she can avoid society and the giving and receiving of irritation that results from social interaction.
It is also important to note that hedgehogs do not actually hurt each other when they get close, human beings tend to keep themselves more “on guard” in relationships and are more likely to sting one another in the way that a relaxed hedgehog would if spooked. When living in groups, hedgehogs often sleep close to each other.
— Wikipedia (All text is available under the terms of the GNU Free Documentation License)