  The Fermi bubbles are two giant bubbles in gamma rays lying above and below
the Galactic center (GC). Despite numerous studies on the bubbles, their origin
and emission mechanism remain elusive. Here we use a suite of hydrodynamic
simulations to study the scenario where the cosmic rays (CRs) in the bubbles
are mainly accelerated at the forward shocks driven by a pair of opposing jets
from Sgr A*. We find that an active galactic nucleus (AGN) jet event happened
$5-6$ Myr ago can naturally reproduce the bilobular morphology of the bubbles,
and the postshock gas temperature in the bubbles is heated to $\sim0.4$ keV,
consistent with recent X-ray observations. The forward shocks compress the hot
halo gas, and at low latitudes, the compressed gas shows an X-shaped structure,
naturally explaining the biconical X-ray structure in the ROSAT 1.5 keV map in
both morphology and X-ray surface brightness. CR acceleration is most efficient
in the head regions of the bubbles during the first 2 Myrs. The opposing jets
release a total energy of $\sim 10^{55}$ erg with an Eddington ratio of $\sim
10^{-3}$, which falls well in the range of the hot accretion flow mode for
black holes. Our simulations further show that the forward shocks driven by
spherical winds at the GC typically produce bubbles with much wider bases than
observed, and could not reproduce the biconical X-ray structure at low
latitudes. This suggests that starburst or AGN winds are unlikely the origin of
the bubbles in the shock scenario.
