Electrospray ionization (ESI)
In ESI, the sample (either directly infused or resolved by a HPLC method) is sprayed through a capillary needle to which a high voltage is applied (typically +/- 3000 V). Compounds in the droplets become charged. A nebulizing gas is used to make a fine droplet spray. This increases the rate of evaporation of the droplets since the surface area-to-volume ratio increases as the droplet size falls. Evaporation is also assisted by a warm countercurrent gas flow. The charged ions in the droplet create a columbic force that pushes outwards in the droplet. Eventually, this force overcomes the surface tension of the droplet and "wet" ions explode from the liquid into the gas phase.
The spraying needle is pointed off-axis with respect to the orifice, a small pinhole that leads into the mass spectrometer, so that fluid that is not evaporated does not enter the mass spectrometer. Instead, the evaporated ions deviate from the path the fluid takes and are attracted towards and through the orifice. On entering the mass spectrometer, the pressure drops rapidly and the ions are accelerated, leading to dissociation of neutral solvent molecules as well as weakly charged cations (NH4+) or anions (formate or acetate). This generates molecular ions, e.g., [M+nH]n+ or [M-nH]n-, which may be multiply charged.
Learn about Determining molecular weights of proteins by ESI