Cordycepin (3'-deoxyadenosine) is a nucleoside analog known for its diverse range of biological activities. This study investigated the effect of different types of sawdust on the production of the bioactive compound cordycepin. The results of the study showed that different types of wood sawdust affected the biosynthesis of cordycepin and a significant increase was observed when the conventional SDB medium was replaced with 1% NaOH treated pine sawdust. To optimize cordycepin production from Paecilomyces tenuipes in a medium containing 1% NaOH-pretreated pine sawdust, we employed Response Surface Methodology (RSM) in its Box-Behnken design (BBD) canonical form. The optimal conditions were determined as follows: a particle size of 109.5111-mesh (140 m) for 1% NaOH-pretreated pine sawdust, an input weight of 21.1679 g/L, and an incubation time of 73.8423 hours. According to our model, this combination is expected to yield a maximum cordycepin content of 896.1428 g/mL. Experimental validation of this prediction was performed using the suggested optimal conditions, resulting in an average cordycepin content of 922.6771 g/mL across three replicates, thus confirming the model's accuracy.