The purpose of a porcupine's quills is for self-defense. When a porcupine feels threatened, it raises its quills to make itself look bigger and more intimidating to predators. If the predator does not back off, the porcupine can release its quills, which are sharp and barbed, into the predator's skin as a defense mechanism.