We present a magnetic-field amplification process in galaxies in conjunction with bar dynamics. Our model considers especially the observed non-circular gas velocities in barred spiral galaxies. The bar drives the spirally-falling gas flow toward the center, which consists of a net radial flow (referred to as flow b) and an elliptically elongated flow rotating in the azimuth (flow a). Such two-dimensional velocity fields (upsilon(r), upsilon(phi)) are subject to the so-called ''anti-dynamo theorem for toroidal motion'' for which planar two-dimensional flows are a special case, i.e. no dynamo action by a two-dimensional velocity field. This is due to the rapid dissipation of the field by turbulent diffusion. In a two-dimensional model the B(r) and B(phi) components are decoupled from the B(z) component and B(z) cannot act as a source for B(r) and B(phi) However, as is well known from observations, galaxies exhibit considerable gas flows perpendicular to the disk in the z-direction, which are driven either by large-scale galactic winds (as in NGC 4631), supernova explosions (as in M82) or by locally enhanced star formation (as in NGC 891). Thus, we can expect that mechanisms exist which couple B(z) with B(r) and B(phi) via these gas flows, so that our model would not violate the anti-dynamo theorem and an interesting possibility is inferred that a bar driven gas flow can act as a source for magnetic field amplification. The induced radial flow by a bar (flow b) produces a magnetic field, whose exponential growth is closely related with the angular-momentum transport by the non-axisymmetric bar perturbation. The field grows on the same time scale (partial derivative upsilon(r)/partial derivative r)-1 is-proportional-to 2pi/OMEGA at which the angular momentum is transferred outwards. Furthermore, the non-axisymmetric gas flow (flow a) also leads to the exponential and oscillatory growth of magnetic fields by driving a growing magnetic wave. The interplay of both flows in a bar hence induces an oscillatory amplification of magnetic fields, and the resulting magnetic field pattern rotates with a bar and holds the azimuthal wavenumber m = 1 or 2, depending on the strength of velocity disturbances. This model naturally explains the characteristic radio features observed in M83, where the m = 1 magnetic field is aligned with the bar, and the bar ends are dominated by the vertical component B(z), giving the holes in polarized intensity map. It is emphasized that the evolution of galactic magnetic fields is closely related with galactic dynamics and evolution.