Melanin, a pigment commonly found in animals, consists of two types of oligomeric unit: eumelanin (black to brown) and pheomelanin (yellow to reddish brown). The color of the skin, the hair, and the eyes is mainly determined by the ratio of eumelanin/pheomelanin production. The biosynthesis of melanin has been extensively investigated over the past 100 years. Among all reaction steps in the biosynthesis, reactions of dopachrome and dopaquinone, precursor molecules of melanin, directly affect the composition of melanin. Dopachrome is spontaneously converted into the monomer of eumelanin via or not via desorption of carboxyl group (decarboxylation). The former (decarboxylative) path is usually preferred whereas the latter (non-decarboxylative) reaction is catalyzed by metal ions such as Cu(II). Depending on the kinetic preference of the two pathways, the carboxyl moiety of eumelanin diversely changes, affecting its properties and functions. Dopaquinone can immediately undergo intramolecular cyclization, which is a reaction to form a cyclic structure, resulting in eumelanin synthesis. In a competitive manner, another reaction, thiol binding, which is a reaction to form a covalent bond with a sulfhydryl group, can prevail above a certain concentration of thiol compounds in the solution, resulting in pheomelanin synthesis. Thus, the fate of dopaquinone is directly related to the ratio of eumelanin/pheomelanin production. Mechanistic understanding of the above-mentioned reactions is a key to predict or design the properties and functions of melanin. Therefore, we make use a theoretical approach in which quantum mechanics is applied to molecular systems. Thus, we employ first principles calculation based on density functional theory. Our results show that the rate-limiting step of dopachrome conversion is deprotonation from β-carbon (β-deprotonation) at the first step. Furthermore, the subsequent steps were found to be regulated by the protonation state of the quinonoid oxygens, which are zwitterionic oxygens bound with benzene ring. Our calculations reveal that the quinonoid protonation facilitates decarboxylation. Cu(II) coordinated by quinonoid oxygens was found to protect the oxygens against protonation, leading to suppression of decarboxylation. For dopaquinone, we investigate the first step of the cyclization and the thiol binding. To evaluate the effects of substituent bound with the benzene ring, we calculate some dopaquinone-like systems. Our results show that quinones presenting their highest occupied molecular orbital (HOMO) localized at the substituent are reactive for cyclization, and that an anti-bonding shape of lowest unoccupied molecular orbital (LUMO) in the benzene-substituent region is a signature for low reactivity toward thiol compounds. This view obtained here is consistent with experiments and would provide a physico-chemical basis of melanin synthesis. Our results will be clues for designing new materials using melanin.