In the extragalactic sky, microquasars and ultra-luminous X-ray sources (ULXs) are known as energetic compact objects locating at off-nucleus positions in galaxies. Some of these objects are associated with expanding bubbles with a velocity of 80-250 ${rm km~s^{-1}}$. We investigate the shock acceleration of particles in those expanding nebulae. The nebulae having fast expansion velocity $gtrsim120~{rm km~s^{-1}}$ are able to accelerate cosmic rays up to $sim100$ TeV. If 10% of the shock kinetic energy goes into particle acceleration, powerful nebulae such as the microquasar S26 in NGC 7793 would emit gamma rays up to several tens TeV with a photon index of $sim2$. These nebulae will be good targets for future Cherenkov Telescope Array observations given its sensitivity and angular resolution. They would also contribute to $sim7$% of the unresolved cosmic gamma-ray background radiation at $ge0.1~{rm GeV}$. In contrast, particle acceleration in slowly expanding nebulae $lesssim120~{rm km~s^{-1}}$ would be less efficient due to ion-neutral collisions and result in softer spectra at $gtrsim10$ GeV.