Aims. We study the formation of substellar objects (exoplanets and brown dwarfs) that are companions to young nearby stars. Methods. With high-contrast AO imaging obtained with NACO at ESO VLT, we search for faint companion candidates around our targets, whose companionship can be confirmed with astrometry. Results. We identified a faint substellar companion to the nearby pre-main sequence star PZ Tel, a member of the β Pic moving group. The companion is 5-6 mag fainter than its host star in JHK and is located at a separation of only 0.3 arcsec (or 15 AU of projected separation) northeast of PZ Tel. Within three NACO observing epochs, we can confirm the common proper motion (>39σ) and detected orbital motion of PZ Tel B around its primary (>37σ). The photometry of the newly found companion is consistent with a brown dwarf with a mass between 24 and 40 M Jup , at the distance (50 pc) and age (8−20 Myr) of PZ Tel. The effective temperature of the companion, derived from its photometry, ranges between 2500 and 2700 K, which corresponds to a spectral type between M6 and M8. After β Pic b, PZ Tel B is the second closest substellar companion imaged directly around a young star.