A nondeterministic finite automaton was designed to monitor enzymatic regulation and detoxification of excess ammonia in the urea cycle and its disorders. The designed machine is used for the diagnosis of deficiency and for regulating the expression of any of the enzymes involved with acceptance and rejection states in the urea cycle. The urea cycle is the metabolism of excess nitrogen produced by the breakdown of protein and other nitrogen-containing molecules in liver. Disorder in the urea cycle may lead to the accumulation of toxic ammonia in the blood, which leads to hyperammonemia. The elevation of plasma ammonia concentration may ultimately lead to cerebral edema in infants and severe brain damage due to the toxicity of ammonia. The diagnosis of urea cycle disorder is based on evaluation of clinical, biochemical, and molecular data. In this study, a new therapeutic approach for urea cycle disorders is developed based on a computational model. It is used to observe the normal process of the cycle through the state of acceptance. The state of rejection denotes a deficiency in the respective enzymatic activity. Subsequently, it assists in the creation of targeted treatment for brain damage and related enzymatic deficiency disorders.