In this research, the integrated carbon dioxide power cycle with the geothermal energy source to supply the required reverse osmosis desalination power for freshwater production is defined. The cycling power is consumed by the desalination system and sodium hypochlorite generator. Exergoeconomic analysis, and optimization are studied. Exergoeconomic analysis is shown that the desalination system, sodium hypochlorite generator, carbon dioxide turbine, and natural gas turbine have the highest rate for the sum of capital gain and exergy destruction cost. For the first case of optimization, the total cost rate is considered as the objective function. The optimal inlet discharge rate of sodium hypochlorite generator was 62% of the brine water outlet discharge rate of the desalination system. Plus, the total cost rate is reduced by 10% compared to the general case when 100% of brine water discharge rate of the desalination system enters into the sodium hypochlorite generator. The second case is multiobjective optimization to reduce costs and increase productivity.