One of the most surprising predictions of modern quantum theory is that the vacuum of space is not empty. In fact, quantum theory predicts that it teems with virtual particles flitting in and out of existence. Although initially a curiosity, it was quickly realized that these vacuum fluctuations had measurable consequences—for instance, producing the Lamb shift1 of atomic spectra and modifying the magnetic moment of the electron2. This type of renormalization due to vacuum fluctuations is now central to our understanding of nature. However, these effects provide indirect evidence for the existence of vacuum fluctuations. From early on, it was discussed whether it might be possible to more directly observe the virtual particles that compose the quantum vacuum. Forty years ago, it was suggested3 that a mirror undergoing relativistic motion could convert virtual photons into directly observable real photons. The phenomenon, later termed the dynamical Casimir effect4,5, has not been demonstrated previously. Here we observe the dynamical Casimir effect in a superconducting circuit consisting of a coplanar transmission line with a tunable electrical length. The rate of change of the electrical length can be made very fast (a substantial fraction of the speed of light) by modulating the inductance of a superconducting quantum interference device at high frequencies (>10 gigahertz). In addition to observing the creation of real photons, we detect two-mode squeezing in the emitted radiation, which is a signature of the quantum character of the generation process.