This paper is concerned with the shape identification problem of the convection–diffusion process for the transport of a contaminant in two dimensions. Based on the continuous adjoint method, the shape gradient of the cost functional is derived by involving a Lagrangian functional with the function space parametrization technique. Then a gradient-type algorithm is applied to the shape reconstruction problem. The numerical examples indicate the proposed algorithm is feasible and effective.