The standard derivation of Kirchhoff's voltage law is based on the assumption that the first law of thermodynamics (sum of products of applied EMF's and corresponding currents = heat dissipation) is satisfied within each loop. In contrast, we start from the fact that first law of thermodynamics applies globally to the electric circuit as a whole. It is then shown that Kirchhoff's voltage law may be derived as an extremum of the system entropy production constrained by the first law applied globally, and that the extremum is a maximum. Thus the stationary distribution of currents in a linear electric circuit is governed by the principle of maximum entropy production.