We investigate experimentally and theoretically diffusiophoretic separation of negatively charged particles in a rectangular channel flow, driven by CO2 dissolution from one side-wall. Since the negatively charged particles create an exclusion zone near the boundary where CO2 is introduced, we model the problem by applying a shear flow approximation in a two-dimensional configuration. From the form of the equations we define a similarity variable to transform the reaction-diffusion equations for CO2 and ions and the advection-diffusion equation for the particle distribution to ordinary differential equations. The definition of the similarity variable suggests a characteristic length scale for the particle exclusion zone. We consider height-averaged flow behaviors in rectangular channels to rationalize and connect our experimental observations with the model, by calculating the wall shear rate as functions of channel dimensions. Our observations and the theoretical model provide the design parameters such as flow speed, channel dimensions and CO2 pressure for the in-flow water cleaning systems.