Forward osmosis optimization has been typically focused on enhancing the water flux or reducing the cost. This paper suggests a methodology to optimize the technical and economic performance simultaneously for brackish water desalination using MgCl2 draw solution. FO models as well as economic equations were developed within DWSIM software and validated using experimental data from the literature. Sensitivity analysis revealed a trade-off between water flux and the levelized cost of water; design parameters such as membrane geometry and module channels, and operating conditions, especially mass flowrates of the solutions and DS molarity showed opposing effects on the two aforementioned key design parameters. Consequently, the formulated optimization problem involves two conflicting objective functions and several decision variables and constraints. To address this challenge, an optimization routine was developed using the non-dominated sorting genetic algorithm (NSGA-II), DWSIM, and Python. Additionally, the key NSGA-II hyperparameters were assessed in order to obtain a satisfactory global Pareto front. The optimal design requires 37 FO modules in series each with 44 channels, while the optimal BW and DS flowrates are 3.463 and 2.467 kg/s, respectively. The optimal configuration is utilized successfully to design three FO units of different water production capacities.