This paper presents the optimization of unsteady Navier–Stokes flows using the variational level set method. The solid–liquid interface is expressed by the level set function implicitly, and the fluid velocity is constrained to be zero in the solid domain. An optimization problem, which is constrained by the Navier–Stokes equations and a fluid volume constraint, is analyzed by the Lagrangian multiplier based adjoint approach. The corresponding continuous adjoint equations and the shape sensitivity are derived. The level set function is evolved by solving the Hamilton–Jacobian equation with the upwind finite difference method. The optimization method can be used to design channels for flows with or without body forces. The numerical examples demonstrate the feasibility and robustness of this optimization method for unsteady Navier–Stokes flows.Copyright © 2012 John Wiley & Sons, Ltd.