Nitrogen vacancy (NV) color centers in diamond enable local magnetic field sensing with high sensitivity by optical detection of electron spin resonance (ESR). The integration of this capability with microfluidic technology has a broad range of applications in chemical and biological sensing. We demonstrate a method to perform localized magnetometry in a microfluidic device with a 48 nm spatial precision. The device manipulates individual magnetic particles in three dimensions using a combination of flow control and magnetic actuation. We map out the local field distribution of the magnetic particle by manipulating it in the vicinity of a single NV center and optically detecting the induced Zeeman shift with a magnetic field sensitivity of 17.5 mu T Hz-1/2. Our results enable accurate nanoscale mapping of the magnetic field distribution of a broad range of target objects in a microfluidic device.