  We study the double heavy baryon $\Xi_{QQ'}$ and tetraquark $T_{QQ}$
production through photon-photon and photon-gluon fusion via ultraperipheral
collisions at the LHC and FCC within the framework of nonrelativistic QCD
factorization formalism. Various ion-ion collisions are taken into account, two
cc(bb)-diquark configurations ($[cc(bb),{^3S_1}\mbox{-}\bar{\bm{3}}]$ and
$[cc(bb),{^1S_0}\mbox{-}\bm{6}]$) and four bc-diquark configurations
($[bc,{^3S_1}\mbox{-}\bar{\bm{3}}]$, $[bc,{^3S_1}\mbox{-}\bm{6}]$,
$[bc,{^1S_0}\mbox{-}\bar{\bm{3}}]$ and $[bc,{^1S_0}\mbox{-}\bm{6}]$) are
considered in the calculation. Numerical results indicate that the
$[cc,{^3S_1}\mbox{-}\bar{\bm{3}}]$ diquark provides dominant contribution for
$\Xi_{cc}$ ($T_{cc}$) production, and a considerable number of $\Xi_{cc}$
($T_{cc}$) can be produced. Due to the event topologies for ultraperipheral
collision are very clear, the background from various QCD interactions can be
suppressed, hence the experimental investigation for $\Xi_{cc}$ and $T_{cc}$
are feasible. The productions for $\Xi_{bc/bb}$ are also discussed, leaving
only slightly possibility for $\Xi_{bc}$ through photon-gluon fusion with
ultraperipheral collisions at the FCC.
