On average, depression affects 7.7% of the population aged 15 and older. One of the types of medicinal plants used to treat depression is saffron, which is uplifting and relieves sadness. Crocin as a bioactive compound is effective against depression, but it is sensitive to temperature, pH, and oxygen, and its efficiency decreases. Nanoencapsulation of crocin using double-layer emulsions is a method to increase the stability of this compound. Surfactant ratio (50% to 200%), stirrer speed (500 and 1000 rpm), and stirring time (45, 90, and 135 min) were used as variables of primary emulsion production. The optimum ratio of surfactant to aqueous phase was 100%, and in all microemulsions, viscosity increased with increasing surfactant ratio. A high-pressure homogenization method was used to make the secondary emulsion (double-layer emulsions), and soy protein concentrate (SPC), Gum Arabic (GA), and Pectin (P) at two levels of 5 and 10% were used to increase the stability. All treatments evaluated using Duncan's test at a significance level of 5%. Double-layer emulsions stabilized with pectin showed the highest viscosity and the lowest release of crocin in simulated stomach and intestine conditions. The use of the cellular automata model to investigate the release of crocin showed that this model could simulate the effects of crocin concentration, polymer concentration, and the droplet size of double-layer emulsions with 93-99% confidence to predict the release in double-layer emulsions. Then the double-layer emulsions added to the chocolate, and the chocolate containing the double-layer emulsions compared with the control sample in terms of sensory properties and had a higher score than the control sample.