The present work reports a computer simulation and optimization study of heat transfer in a rotary kiln used for drying and preheating wood chips with superheated steam at 1 bar. A rotary kiln employed for drying and preheating wet solids consists of a refractory lined cylindrical shell mounted at a slight incline from the horizontal plane. The kiln is slowly rotated about its longitudinal axis. Wet solids are fed into the upper end of the cylinder, and during the process, they are dried and heated by the counter-current flow of the hot gas. Finally, it is transferred to the lower end, where it reaches the desired temperature and is discharged. The heat transfer model includes radiation exchange among hot gas, refractory wall and the solid surface, transient conduction in the refractory wall, and mass and energy balances of the hot gas and solids. A finite-difference based computational heat transfer approach is used. A univariate search method has been used to obtain the minimum kiln length with respect to various kiln operating parameters subject to a constraint on the inlet gas temperature. The parametric study lent a good insight into the physics of the drying process in a rotary kiln. The optimization study reveals that for the same predicted kiln length, lower inlet steam temperature can be used, which will result in saving of energy cost.