In this article we study solutions of the nonlinear fractional Burgers equation with a nonhomogeneous term associated with external forces. This equation is a generalization of the nonhomogeneous diffusion equation with an additional term that describes a nonlocal nonlinearity by means of a fractional order derivative of Caputo type. By using a generalized Cole-Hopf transformation, the fractional Burgers equation is mapped to a linear partial differential equation, this formalism allows to deduce analytical solutions. We explore the effects related to the nonhomogeneous term and the order of the fractional derivative.