We optically excite the electronic state 3s3p P-3(0) in Mg-24 atoms, laser cooled and trapped in a magic-wavelength lattice. An applied magnetic field enhances the coupling of the light to the otherwise strictly forbidden transition. We determine the magic wavelength, the quadratic magnetic Zeeman shift, and the transition frequency to be 468.46(21) nm, -206.6(2.0) MHz/T-2, and 655 058 646 691(101) kHz, respectively. These are compared with theoretical predictions and results from complementary experiments. We also develop a high-precision relativistic structure model for magnesium, give an improved theoretical value for the blackbody radiation shift, and discuss a clock based on bosonic magnesium.