A macroscopic Lagrangian is derived which includes a pressure tensor, heat conduction, and elastic collisions. Its Euler-Lagrange equations are shown to be the Maxwell equations and the macroscopic force law. The corresponding Hamiltonian is derived, and Hamilton's canonical equations are also demonstrated to lead to the Maxwell equations and the macroscopic force law. The treatment is facilitated by working in a mixture of Eulerian coordinates (for the fields) and Lagrangian coordinates (for the particle motions), and the introduction of a macroscopic potential expressed in terms of the plasma thermal energy and the energy losses by heat conduction. In paper 2 the macroscopic Lagrangian is applied to the description of nonlinear three-wave interactions.