Solid-state superconducting circuits1, 2, 3 are versatile systems in which quantum states can be engineered and controlled. Recent progress in this area has opened up exciting possibilities for exploring fundamental physics as well as applications in quantum information technology; in a series of experiments4, 5, 6, 7, 8 it was shown that such circuits can be exploited to generate quantum optical phenomena, by designing superconducting elements as artificial atoms that are coupled coherently to the photon field of a resonator. Here we demonstrate a lasing effect with a single artificial atom—a Josephson-junction charge qubit9—embedded in a superconducting resonator. We make use of one of the properties of solid-state artificial atoms, namely that they are strongly and controllably coupled to the resonator modes. The device is essentially different from existing lasers and masers; one and the same artificial atom excited by current injection produces many photons.