Biological macromolecules, carbohydrates, lipids, proteins, and nucleic acids, are the most important large molecules in the body.
Proteins and nucleic acids contain nitrogen that is often a byproduct when these molecules are broken down. Excess nitrogen in the body tends to form ammonia, which is highly toxic and must be removed either directly or after conversion to urea or uric acid.
Most aquatic animals directly release ammonia into their environment. Much of the ammonia is lost to diffusion, so this process is not energy-intensive. However, ammonia can only be tolerated at low concentrations, so these animals require lots of water to dilute it in.
For many organisms, this water cost is too hefty. Mammals, many adult amphibians, and some marine organisms convert ammonia into urea before expelling it from the body.
Urea is much less toxic than ammonia, so it requires less water for its removal. However, converting ammonia into urea requires energy.
Birds, reptiles, and insects convert ammonia primarily into uric acid. Uric acid can be excreted in a more solid form, requiring very little water. However, converting ammonia into uric acid is even more energy-intensive than conversion to urea.
The advantages and costs of these ammonia-removal methods, direct release or conversion to urea or uric acid, reflect the adaptations by organisms to different habitats.
Fossil evidence indicates that life began in water. As organisms moved to land, dry conditions likely spurred the evolution of the uric acid pathway, allowing animals to conserve more water.
Different reproductive characteristics also favored distinct methods of nitrogenous waste removal.
For example, the water-solubility of urea allows mammalian embryos to remove waste in their mother's blood.
On the other hand, the solid nature of uric acid allows waste from bird embryos to form harmless lumps inside of eggs, which have hard shells that urea would be unable to pass through.