Phosphorus (P) recovery was carried out through struvite precipitation from urines. Human urine, however, contains not only high nutrients for plants, such as P and nitrogen, but also pharmaceuticals and hormones. In this work, effects of magnesium (Mg) dose (in terms of Mg:P ratio) on P recovery efficiency and pharmaceutical amounts contained in struvite were investigated. Batch-scale experiments of synthetic and human urines revealed that struvite precipitation formed more X-shaped crystals with an increased molar ratio of Mg:P, while the amount of pharmaceuticals (tetracycline, demeclocycline, and oxytetracycline) in struvite decreased with an increased molar ratio of Mg:P. The lowest pharmaceutical amounts in struvite were found at the Mg:P ratio of 2:1 from both samples. Moreover, the maximum P recovery efficiency, quantity and purity of struvite were found in the range of 1.21 to 2:1. It indicated that the molar ratio of Mg:P has a significant impact on struvite precipitation in terms of pharmaceutical amounts in struvite; morphology, quantity and purity of struvite; and P recovery.