Oyster peptide (OP) and Pfaffia glomerata extract (PGE) were used as raw materials. The optimal formulation of the pressed candy (PC) was optimized by one‐way experiment and D‐optimal mixture experiment design, and animal experiment was used to evaluate the effect of PC on male sexual dysfunction. The results showed that PC intervention significantly improved the sexual behavior of male mice with sexual dysfunction, including a significant shortening of the mount latency (ML) and intromission latency, and a significant increase in the mount frequency (MF) and intromission frequency (IF). At the same time, the concentrations of serum testosterone (T) and luteinizing hormone (LH) in mice were restored, and the erectile parameters and pathological changes of penile tissue were improved. Further studies found that PC intervention increased the activities of superoxide dismutase (SOD), catalase (CAT), and glutathione peroxidase (GSH‐Px) and reduced the content of malondialdehyde (MDA) in testicular tissue. In addition, PC intervention improved testicular tissue morphology. In conclusion, the obtained PC has good taste quality, and the relevant quality indicators are qualified. It has a good ameliorative effect on male sexual dysfunction and may be a potential dietary supplement.