Congenital radioulnar synostosis (CRUS) presents a complex forearm deformity, requiring precise osteotomy planning for anatomical restoration. This study proposes an automatic osteotomy preoperative planning method for forearms with CRUS. Proximal forearm bones are first aligned with the template forearm and then a dual hierarchical optimization (DHO) strategy is used to optimize the spatial transformation parameters of the distal fragment. The subsequent optimization aims to maximize the overlap of cross-sections between proximal and distal fragments. Rotational simulations are ultimately conducted to predict postoperative forearm rotational functionality. The DHO strategy effectively restores ideal forearm morphology, with maximum deviations of 1.66 and 2.13 mm for the ulna and radius, respectively. The deformity angles of forearm bones are reduced to 1.35°, 1.39°, 4.83°, 1.20°, 1.03°, and 8.56°. Rotation function analysis reveals a noticeable improvement in achievable rotation range compared to plans by senior surgeons. Automated mobilization osteotomy planning, using the DHO strategy, shows potential for individualized CRUS corrective surgery, offering comprehensive and precise preoperative guidance.