The large abundance of NH3 in Titan's upper atmosphere is a consequence of coupled ion and neutral chemistry. The density of NH3 is inferred from the measured abundance of NH4+. NH3 is produced primarily through reaction of NH2 with H2CN, a process neglected in previous models. NH2 is produced by several reactions including electron recombination of CH2NH2+. The density of CH2NH2+ is closely linked to the density of CH2NH through proton exchange reactions and recombination. CH2NH is produced by reaction of N(2D) and NH with ambient hydrocarbons. Thus, production of NH3 is the result of a chain of reactions involving non-nitrile functional groups and the large density of NH3 implies large densities for these associated molecules. This suggests that amine and imine functional groups may be incorporated as well in other, more complex organic molecules.