The chiral corrections to the magnetic moments of the spin-$frac{1}{2}$ doubly charmed baryons are systematically investigated up to next-to-next-to-leading order with heavy baryon chiral perturbation theory (HBChPT). The numerical results are calculated up to next-to-leading order: $mu_{Xi^{++}_{cc}}=-0.25mu_{N}$, $mu_{Xi^{+}_{cc}}=0.85mu_{N}$, $mu_{Omega^{+}_{cc}}=0.78mu_{N}$. We also calculate the magnetic moments of the other doubly heavy baryons, including the doubly bottomed baryons (bbq) and the doubly heavy baryons containing a light quark, a charm quark and a bottom quark (${bc}q$ and $[bc]q$): $mu_{Xi^{0}_{bb}}=-0.84mu_{N}$, $mu_{Xi^{-}_{bb}}=0.26mu_{N}$, $mu_{Omega^{-}_{bb}}=0.19mu_{N}$, $mu_{Xi^{+}_{{bc}q}}=-0.54mu_{N}$, $mu_{Xi^{0}_{{bc}q}}=0.56mu_{N}$, $mu_{Omega^{0}_{{bc}q}}=0.49mu_{N}$, $mu_{Xi^{+}_{[bc]q}}=0.69mu_{N}$, $mu_{Xi^{0}_{[bc]q}}=-0.59mu_{N}$, $mu_{Omega^{0}_{[bc]q}}=0.24mu_{N}$.