We generate an ultrafast Airy beam with a mode-locked fiber laser. A diffractive optical element is placed inside the laser cavity and applies phase modulation on the pulses propagating in the cavity. The pulsed Airy beam is then obtained by Fourier transform of the first order diffracted beam of the diffractive optical element. The experimental results show that the beam profile and propagation characteristics of the laser pulses are consistent with the theoretical analysis. The pulsed Airy beam fiber laser we constructed has the advantages of compactness, easy integration, low cost, and high stability and robustness, which are of great significance for applications in industrial and other tough environments.