  The gamma-ray excess observed by the Fermi-LAT in the Galactic Center can be
interpreted by the dark matter annihilation to $b\bar{b}$ via a light
pseudoscalar in the NMSSM. It is interesting to note that the corresponding
singlet scalar is useful to achieve a strongly first order phase transition
required by the electroweak baryogenesis. In this paper, we investigate the
possibility that the NMSSM model can simultaneously accommodate these two
issues. The phase transition strength can be characterized by the vacua energy
gap at zero temperature and be sufficiently enhanced by the tree-level effect
in the NMSSM. We find that the annihilation of Singlino/Higgsino DM particles
occurring close to the light pseudoscalar resonance is favored by the galactic
center excess and the observed DM relic density, and a resulting small
$\kappa/\lambda$ and a negative $A_\kappa$ can also lead to a successful
strongly first order electroweak phase transition.
