We report on the first star discovered to host a planet detected by radial velocity (RV) observations obtained within the CARMENES survey for exoplanets around M dwarfs. HD 147379 (V = 8.9 mag, M = 0.58 ± 0.08 M⊙), a bright M0.0 V star at a distance of 10.7 pc, is found to undergo periodic RV variations with a semi-amplitude of K = 5.1 ± 0.4 m s−1 and a period of P = 86.54 ± 0.06 d. The RV signal is found in our CARMENES data, which were taken between 2016 and 2017, and is supported by HIRES/Keck observations that were obtained since 2000. The RV variations are interpreted as resulting from