It is a complex biochemical metabolism for forming nitrogenous end products from protein degradation. This is to prevent toxicological consequences.
Amino acid degradation or nitrogen metabolism results in the formation of ammonia, excess ammonia are removed as urea by the Urea cycle or Krebs-Henseleit Cycle.
Urea is formed in the liver and excreted in the urine.
Hence, the end product of nitrogen metabolism in mammals is urea.