We propose an original concept to perform a complete on-chip sandwich immunoassay on magnetic nanoparticles that are self-assembled in chains in a uniform magnetic field. The magnetic chains are retained over periodically enlarged cross sections of a microfluidic channel. Thereby they strongly interact with the flow and rapidly capture the total of a low number of target molecules from nanoliter sample volumes. As an example, we demonstrate the detection of murine monoclonal antibodies in a noncompetitive sandwich immunoassay with a detection limit of 1 ng mL-1 in nanoliters of hybridoma cell culture medium.