This work investigates the on-chip washing process of microparticles and cells using coflow configuration of viscoelastic fluid and Newtonian fluid in a straight microchannel. By adding a small amount of biocompatible polymers into the particle medium or cell culture medium, the induced viscoelasticity can push particles and cells laterally from their original medium to the coflow Newtonian medium. This behavior can be used for particle or cell washing. First, we demonstrated on-chip particle washing by the size-dependent migration speed using coflow of viscoelastic fluid and Newtonian fluid. The critical particle size for efficient particle washing was determined. Second, we demonstrated continuous on-chip washing of Jurkat cells using coflow of viscoelastic fluid and Newtonian fluid. The lateral migration process of Jurkat cells along the channel length was investigated. In addition, the cell washing quality was verified by hemocytometry and flow cytometry with a recovery rate as high as 92.8%. Scanning spectrophotometric measurements of the media from the two inlets and the two outlets demonstrated that diffusion of the coflow was negligible, indicating efficient cell washing from culture medium to phosphate-buffered saline medium. This technique may be a safer, simpler, cheaper, and more efficient alternative to the tedious conventional centrifugation methods and may open up a wide range of biomedical applications.