In this research, the MFO algorithm was used for the first time in order to design the marine propeller duct. For this purpose, the goal of maximum efficiency as a merit function and minimum cavitation (which are in conflict with each other) has been considered as a limitation, and during several test stages in the merit function and according to the defined geometrical parameters, the most optimal state of the two-dimensional hydrofoil has been drawn. In order to deduce this method, the obtained hydrofoil has been compared with the NACA4415 hydrofoil, which is a desirable hydrofoil and used in various industries, in Ansys software. Then the hydrofoil is drawn in 3D and analyzed as a propeller duct in Ensys software at different speeds. By using the MFO algorithm, the parameters of an optimal hydrofoil have been obtained in terms of maximum efficiency and minimum cavitation. The optimal thickness value is 12.6 percent of the chord, the maximum thickness location is 21 percent of the chord, the maximum camber location is 42.3 tenths of the chord, the maximum camber is 5.12 percent, and the obtained efficiency value is 69.4. Also, the highest static pressure was obtained at the attack angle of 1/4, 360 and the lowest static pressure was -419, and at the attack angle of 1/6, the highest static pressure was 359 and the lowest static pressure was -595.