Mosquitoes excrete urine from their anus after running fluid through organs called Malpighian tubules, analogous to the human kidneys. Malpighian tubules filter out waste from the insect's hemolymph and carry it out into the same organ that excretes solid matter.
A mosquito's excretory system is very similar to that of many other types of insects. Like their insect brethren, they have a system of blind tubes in between their mid- and hind-guts. These tubes, called Malpighian tubules, filter out waste from the hemolymph, which surrounds the insect's bodily organs and functions similarly to blood. The waste from the hemolymph is then transported by the tubules into the insect's hind gut, where it is pushed out through the anus. Mosquitoes often urinate as they feed to prevent becoming overwhelmed by the large amount of water and salt contained inside nutritious blood.