We present a new method for three-dimensional (3D) magnetic focusing of magnetic microparticles in a microfluidic system. On-chip magnetic particle manipulation in themicrochannel is achieved by a high-gradientmagnetic field generated by means of a micromachined field concentrator. The system allows retention of functionalized beads in a dense plug while flowing through buffer or analyte. Slowly reducing the magnetic retention force in the presence of a flow results in controlled release of the particles into a fine streamline with regular longitudinal interparticle spacing. Alignment at half-height of the channel is readily obtained through the symmetry of the magnetic field. A single lateral sheath flow is required to provide full 3D focusing of the microparticles in the middle of the microchannel with a maximum deviation of ±5 μm from the center position. With the use of this system, a new approach for performing an immunoagglutination assay on-chip has been implemented. Three-dimensional focusing allowed reliable counting of singlets and agglutinated doublets. We demonstrate the potential of the agglutination assay in a microfluidic format using a streptavidin/biotinylated bovine serum albumin (bBSA) model system. A detection limit of about 400 pg/mL (6 pM) is achieved.