In order to understand the numerical simulation and optimal control of the casting process of Machine element, the author proposed a study based on the numerical simulation and optimal control of the casting process of composite Machine element. Firstly, the author analyzed the structural characteristics of composite Machine element, introduced them in detail, and studied their casting technology in combination with the actual situation. Secondly, the casting process of composite Machine element was simulated by using numerical simulation method, and the temperature field and flow field in the casting filling and solidification process were analyzed. Finally, selecting square cylinders with different wall thicknesses as typical components, the scheme design of traditional single casting process and multi material composite casting process based on dieless casting composite forming technology were carried out. Finite element numerical simulation and experimental research were conducted on the two processes, respectively. The results indicate that: The casting obtained by the multi material composite casting process almost solidifies simultaneously around 200 seconds later, and the graphite morphology around the casting is Type A, with a length of about 100 um, with small differences and uniform distribution; The minimum difference in tensile strength around the casting is about 3.8%, and the maximum increase in tensile strength value is 21%. This research achievement can provide technical reference for high-performance and high-quality casting of complex iron castings. In order to improve the casting quality, the author optimized the casting process of composite Machine element by numerical simulation.