A (3+1)-dimensional Einstein-Gauss-Bonnet theory of gravity has been recently formulated by Glavan and Lin [D. Glavan and C. Lin, Phys. Rev. Lett. 124, 081301 (2020)PRLTAO0031-900710.1103/PhysRevLett.124.081301] which is different from the pure Einstein theory, i.e., bypasses the Lovelock's theorem and avoids Ostrogradsky instability. The theory was formulated in D>4 dimensions and its action consists of the Einstein-Hilbert term with a cosmological constant, while the Gauss-Bonnet term multiplied by a factor 1/(D-4). Then, the four-dimensional theory is defined as the limit D→4. Here we generalize this approach to the four-dimensional Einstein-Lovelock theory and formulate the most general static 4D black-hole solution allowing for a Λ term (either positive or negative) and the electric charge Q. As metric functions cannot be found in a closed form in the general case, we develop and share publicly the code which constructs the metric functions for every given set of parameters. © 2020 American Physical Society.