We previously used bioassay-guided fractionation to identify phycoerythrobilin (1) and its monomethyl ester, aplysioviolin (2), as components in the ink secretion of a marine gastropod, the sea hare Aplysia californica, that act as chemical deterrents against predatory blue crabs. This was the first report of 1 as a natural product. Compound 2 was previously reported as a natural product from three species of Aplysia (A. fasciata, A. dactylomela, and A. parvula), but the reported structure and composition of stereoisomers of 2 are different among these species. Sea hares are thought to produce 2 from phycoerythrin, a photosynthetic pigment in their red-algal diet composed of a phycobiliprotein covalently linked to the chromophore 1, by cleavage of the covalent bond and methylation of 1, but neither the sequence nor the anatomical location of the cleavage and methylation is known. In this study, we clarify the structure of 1 and 2 in ink secretion of A. californica, and describe the distribution of 1 and 2 in the tissues of sea hares. We conclude that cleavage of the covalent bond in phycoerythrin occurs first, forming 1 in the digestive gland, followed by methylation of 1 to yield 2 in the ink gland.