The aim of this study was to optimize the shelf temperature and the drying time, mainly dependent on the residual water content of a lyophilized product using a novel simulation program for the secondary drying of lyophilization. The simulation program was developed based upon heat transfer formulas, two empirical formulas, and a modified Fick’s second law. When a preliminary lyophilization run of secondary drying was carried out, the equilibrium product temperature at the end of secondary drying under various shelf temperatures was accurately predicted by the heat transfer formulas. The apparent diffusion coefficient of water, Deff, and the apparent equilibrium residual water content, We, under the predicted equilibrium product temperature were estimated by two empirical formulas. These estimated Deff and We allow the modified Fick’s second law to predict the residual water content in the lyophilized product. Using the developed simulation program, it was verified that the secondary drying condition to achieve the desired residual water content in the lyophilized product was successfully predicted. Therefore, the simulation program can be used to effectively design the secondary drying condition of lyophilization cycles without a trial and error approach.