The protandric shrimp Hippolyte inermis is the only known marine invertebrate whose sex determination is strongly influenced by the composition of its food. In H. inermis, a sex reversal is triggered by the ingestion of diatoms of the genus Cocconeis associated with leaves of the seagrass Posidonia oceanica. These diatoms contain compounds that promote programmed cell death (PCD) in H. inermis and also in human cancer cells. Transcriptomic analyses suggested that ferroptosis is the primary trigger of the shrimp’s sex reversal, leading to the rapid destruction of the androgen gland (AG) followed by a chain of apoptotic events transforming the testes into ovaries. Here, we propose a molecular approach to detect the effects of compounds stimulating the PCD. An RNA extraction method, suitable for young shrimp post-larvae (five days after metamorphosis; PL5 stage), was established. In addition, six genes involved in apoptosis, four involved in ferroptosis, and seven involved in the AG switch were mined from the transcriptome, and their expression levels were followed using real-time qPCR in PL5 fed on Cocconeis spp., compared to PL5 fed on a basic control feed. Our molecular approach, which detected early signals of sex reversal, represents a powerful instrument for investigating physiological progression and patterns of PCD in marine invertebrates. It exemplifies the physiological changes that may start a few days after the settlement of post-larvae and determine the life destiny of an individual.