Modern cylinder-head designs for gasoline engines are guiding the exhaust gas to the turbocharger system via an integrated exhaust manifold (IEM) which has several advantages like weight and cost reduction. On the other hand, the exhaust ports are running through a package labyrinth and are heavily bent within smallest space. Increased pressure drop, reduced mass flow rate, and deteriorated port flow efficiency could be the consequences leading to higher emissions, increased fuel consumption, and higher knock sensitivity. The optimization of the individual ports by computational fluid dynamics (CFD) is a proper means to minimize or even delete these drawbacks. Meanwhile, there are several powerful optimization methods for three-dimensional flows on the market. In this paper, a combined optimization strategy using CFD topology optimization followed by a shape optimization is presented. The proposed method has been applied to an I3 engine with two separate integrated exhaust manifolds serving a parallel sequential twin boosting system. The mass flow rates through the exhaust ports have been improved by up to 18 %. The flow efficiency has been substantially improved leading to better emissions and reduced fuel consumption. At the end, an initial design of these flow-optimized ports has been generated. So, the designer starts with an optimized design solution. This new workflow is highly efficient, reduces development time, improves result quality, and may reduce the number of expensive and time-consuming test-rig measurements.