We study the dynamics of domain walls (DWs) in a metallic, ferromagnetic nanowire, focusing on inertial effects on the DW due to interaction with a conduction electron bath. We develop a Keldysh collective coordinate technique to describe the effect of conduction electrons on rigid magnetic structures. The effective Lagrangian and Langevin equations of motion for a DW are derived microscopically, including the full response kernel which is nonlocal in time. The DW dynamics is described by two collective degrees of freedom: position and tilt angle. The coupled Langevin equations therefore involve two correlated noise sources, leading to a generalized fluctuation-dissipation theorem (FDT). The DW response kernel due to electrons contains two parts: one related to dissipation via FDT and another reactive part. We prove that the latter term leads to a mass for both degrees of freedom, even though the intrinsic bare mass is zero. The electron-induced mass is present even in a clean system without pinning or specifically engineered potentials. The resulting equations of motion contain rich dynamical solutions and point toward a way to control domain wall motion in metals via the electronic system properties. We discuss two observable consequences of the mass, hysteresis in the DW dynamics, and resonant response to ac current.