By binding iron in a Fenton-reactive form, intracellular hydroxyl radical production would ensue, but hydroxyl would be immediately trapped and scavenged by the minoxidil to generate a nitroxyl radical. It is presumed that this nitroxyl radical will be capable of reduction by glutathione to reform minoxidil. Such a process would cycle until the minoxidil is otherwise metabolized and would result in rapid glutathione depletion with glutathione disulphide formation and therefore with concomitant consumption of NADPH/ NADH and other reducing equivalents. Minoxidil inhibited PHD by interfering with the normal function of ascorbate, a cofactor of the enzyme, leading to a stabilization of HIF-1α protein and a subsequent activation of HIF-1. In an in vivo angiogenesis assay, millimolar minoxidil increased blood vessel formation in a VEGF-dependent manner. Minoxidil inhibition of PHD occurs via interrupting ascorbate binding to iron. The structural feature of positioning amines adjacent to nitric oxide may confer the ability of millimolar minoxidil to chelate iron, thereby inhibiting PHD. Minoxidil is capable of tetrahydrobiopterin inhibition as a cofactor for nitric oxide synthase.Minoxidil stimulates prostaglandin E2 production by activating COX-1 and prostaglandin endoperoxide synthase-1 but inhibits prostacyclin production. Additionally, expression of the prostaglandin E2 receptor, the most upregulated target gene in the β-catenin pathway of DP cells, was enhanced by minoxidil, which may enable hair follicles to grow continuously and maintain the anagen phase.Due to anti-fibrotic activity of minoxidil inhibition of enzyme lysyl hydroxylase present in fibroblast may result in synthesis of a hydroxylysine-deficient collagen.
Oxidation of this product with 3-chloroperbenzoic acid gives 2,4-diamino-6-(2,4-dichlorophenoxy)pyrimidine-3-oxide, the 2,4-dichlorophenoxyl group of which is replaced with a piperidine group at high temperature, giving minoxidil.Another synthesis approach is depicted here:

Compounds related to minoxidil include kopexil (diaminopyrimidine oxide). History
Initial application
Minoxidil was developed in the late 1950s by the Upjohn Company (later became part of Pfizer) to treat ulcers. In trials using dogs, the compound did not cure ulcers, but proved to be a powerful vasodilator. Upjohn synthesized over 200 variations of the compound, including the one it developed in 1963 and named minoxidil. These studies resulted in the U.S. Food and Drug Administration (FDA) approving minoxidil (with the brand name Loniten) in the form of oral tablets to treat high blood pressure in 1979. Hair growth
When Upjohn received permission from the U.S. Food and Drug Administration (FDA) to test the new drug as medicine for hypertension they approached Charles A. Chidsey MD, Associate Professor of Medicine at the University of Colorado School of Medicine. He conducted two studies, the second study showing unexpected hair growth. Puzzled by this side-effect, Chidsey consulted Guinter Kahn (who while a dermatology resident at the University of Miami had been the first to observe and report hair development on patients using the minoxidil patch) and discussed the possibility of using minoxidil  for treating hair loss. Kahn along with his colleague Paul J. Grant MD had obtained a certain amount of the drug and conducted their own research, since they were first to make the side effect observation.