We report on the first observation of the continuous Stern-Gerlach effect on an electron bound in an atomic ion. The measurement was performed on a single hydrogenlike ion ( 12C5+) in a Penning trap. The measured g factor of the bound electron, g = 2.001 042(2), is in excellent agreement with the theoretical value, confirming the relativistic correction at a level of 0.1%. This proves the possibility of g-factor determinations on atomic ions to high precision by using the continuous Stern-Gerlach effect. The result demonstrates the feasibility of conducting experiments on single heavy highly charged ions to test quantum electrodynamics in the strong electric field of the nucleus.