In this paper we propose a new mechanism for the generation of a large-scale galactic magnetic field by the electric current created by cosmic rays. A model with the sources of relativistic particles, distributed homogenously and continuously in the galactic disk is used, and intensities of the sources correspond to the observed intensities. The anisotropic diffusion of cosmic rays in the galaxy is considered and it is shown that the created magnetic field depends strongly on the symmetry of the diffusion tensor as well as on the relationship between the tensor's components. The helicity of turbulence (alpha-effect) is not considered. Only the small-scale "seed" fields ejected from stars and generated by cosmic rays are necessary to start the global magnetic field generation. The diffusion of the field because of turbulent motions and the differential rotation of the galactic disk are taken into account. The diffusion coefficient values estimated from the observed parameters of the galactic medium are used in the calculations. The obtained magnetic field is approximately a few micro-gauss which is of the same order of magnitude as the observed galactic field. Therefore, it is concluded that the relativistic particles are significant and, possibly, essential for the process of the large-scale galactic magnetic field generation. More precise determinations of the diffusion coefficients for the field and the particles are needed to reach the final conclusion about the field's value. The future development of the theory should also include dynamo action, the nonlinear effects, and the self-consistent approach to the problem.