Trans-anethole possesses several biological and pharmacological effects. It is also used as masking agent in household products and as a flavoring agent in food. Clausena anisata (Willd.) Hook. f. ex Benth. leaves are reported as a source of trans-anethole that makes their anise-like odor. This work sought to optimize the dynamic maceration of C. anisata leaves to maximize the trans-anethole content. The circumscribed central composite experimental design was applied to investigate the effects of extraction temperature and time on extraction yield, trans-anethole content in the extract, and trans-anethole content in the plant raw material. The results showed that the extraction yield was high when C. anisata leaves were extracted over a long extraction time, while the extraction temperature had a lesser effect on the extraction yield. Trans-anethole content in the extract and plant raw material determined using a linear, specific, precise, and accurate HPLC method was high when a medium extraction temperature with a short extraction time was used. The optimal condition that maximized trans-anethole content involved an extraction temperature of 61.8 °C and an extraction time of 12.9 min, respectively. The percentage error of the prediction conducted by computer software was low, suggesting that the prediction was highly accurate. In conclusion, the optimal condition of dynamic maceration obtained from this work could be used as a guide for maximizing trans-anethole content from C. anisata leaves.