Context. Mass-loss occurring in red supergiants (RSGs) is a major contributor to the enrichment of the interstellar medium in dust and molecules. The physical mechanism of this mass loss is however relatively poorly known. Betelgeuse is the nearest RSG, and as such a prime object for high angular resolution observations of its surface (by interferometry) and close circumstellar environment. Aims. The goal of our program is to understand how the material expelled from Betelgeuse is transported from its surface to the interstellar medium, and how it evolves chemically in this process. Methods. We obtained diffraction-limited images of Betelgeuse and a calibrator (Aldebaran) in six filters in the N band (7.76 to 12.81 μm) and two filters in the Q band (17.65 and 19.50 μm), using the VLT/VISIR instrument. Results. Our images show a bright, extended and complex circumstellar envelope at all wavelengths. It is particularly prominent longwards of ≈9–10 μm, pointing at the presence of O-rich dust, such as silicates or alumina. A partial circular shell is observed between 0.5 and 1.0′′ from the star, and could correspond to the inner radius of the dust envelope. Several knots and filamentary structures are identified in the nebula. One of the knots, located at a distance of 0.9′′ west of the star, is particularly bright and compact. Conclusions. The circumstellar envelope around Betelgeuse extends at least up to several tens of stellar radii. Its relatively high degree of clumpiness indicates an inhomogeneous spatial distribution of the material lost by the star. Its extension corresponds to an important intermediate scale, where most of the dust is probably formed, between the hot and compact gaseous envelope observed previously in the near infrared and the interstellar medium.