This study developed a mathematical model of the transient mass and heat transfer of Cordyceps militaris during lyophilization. This mathematical model was solved using a program coded in MATLAB to simulate the relationship between product temperature and sublimation rate over time. The parameters of the drying mode were set in the simulation as follows: heating plate temperature from 273.2 to 303.2 K, the absolute pressure of the drying chamber is from 30 Pa to 60 Pa. The fruiting body of cordyceps analyzed in the study is considered a cylindrical shape with a radius of 1.5 mm and length of 60 mm, which was arranged in 1 layer on a tray with dimensions of 200x300x20 mm. Research shows that the sublimation rate increases when the heating plate temperature increases. Besides, the decrease in sublimation chamber pressure will lead to rapid increases in drying speed. This result can also be used to build software to set the technological mode for the cordyceps drying process by sublimation.