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.
This antiandrogenic effect of minoxidil, shown by significant downregulation of 5α-R2 gene expression in HaCaT cells, may be one of its mechanisms of action in alopecia.Minoxidil is less effective when the area of hair loss is large. In addition, its effectiveness has largely been demonstrated in younger men who have experienced hair loss for less than 5 years. Minoxidil use is indicated for central (vertex) hair loss only. Two clinical studies are being conducted in the US for a medical device that may allow patients to determine if they are likely to benefit from minoxidil therapy.Conditions such as Cantú syndrome have been shown to mimic the pharmacological properties of minoxidil. Chemistry
Minoxidil is an odorless, white to off-white, crystalline powder (crystals from methanol-acetonitrile). When heated to decomposition it emits toxic fumes of nitrogen oxides. It decomposes at 259-261 °C.Solubility (mg/ml): propylene glycol 75, methanol 44, ethanol 29, 2-propanol 6.7, dimethylsulfoxide 6.5, water 2.2, chloroform 0.5, acetone <0.5, ethyl acetate <0.5, diethyl ether <0.5, benzene <0.5, acetonitrile <0.5.