Postherpetic neuralgia is a painful condition that occurs after a person has had shingles. It is caused by damage to the nerves that were affected by the shingles virus. The pain can be severe and can last for months or even years after the shingles rash has healed.