The Free Form Deformation method was applied to an S-duct geometry to reduce total pressure losses and flow distortion. The deformation method was coupled with a multiobjective genetic algorithm to optimize the shape of a diffusing S-duct, which was numerically and experimentally investigated in previous works. During the optimization process, 200 deformed shapes were tested with steady-state CFD simulations and the performances were evaluated both in terms of total pressure losses and swirl angle at the outlet. It was obtained a Pareto front with a maximum total pressure losses reduction of 20% and a maximum swirl reduction of 10%. The two extreme points of the Pareto front were further investigated by unsteady Detached Eddy Simulations to assess also the impact of the optimization on the flow instability. Surprisingly, one of the solutions showed stable and stationary vortical structures. This is in strong contrast with the previous investigations of the flow field time history of the baseline configuration, which outlined strong oscillations of the flow field combined with a high increase of the distortion parameters in comparison with the time-averaged flow field.