We describe the derivation of the Vlasov-Maxwell equations from the Lagrangian of classical electrodynamics, from which magnetohydrodynamic-type equations are in turn derived. We consider both the relativistic and nonrelativistic cases: with zero temperature as the exact consequence of the Vlasov-Maxwell equations and with nonzero temperature as a zeroth-order approximation of the Maxwell-Chapman-Enskog method. We obtain the Lagrangian identities and their generalizations for these cases and compare them.