The magnetic moments of Λ-hypernuclei are the most interesting observables which provide a highly sensitive probe of lambda in the hypernuclei structure and also supply direct information on hyperon-nucleon interactions. In this work, we derive the magnetic moments of Λ-hypernuclei such as O , C and Ca employing a relativistic approach in the presence of the Dirac equation and the spin-orbital potential in their ground and excited states, i.e. the 1S1/2, 1P3/2 and 1P1/2 states. We, then, extract an analytic solution for the wave function of hyperon which is needed for computing the magnetic moments of Λ-hypernuclei. The hypernuclei magnetic moments are the magnetic moment of the last unpaired baryon for the odd mass hypernuclei, therefore, in our work we study the hypernuclear magnetic moment with one Lambda added to a closed-shell core of nucleons. Since Λ-hypernuclei is an isoscalar particle it is possible to directly probe the modified core current electromagnetically.