We describe a method used to calibrate the position- and time-dependent response of the MicroBooNE liquid argon time projection chamber anode wires to ionization particle energy loss. The method makes use of crossing cosmic-ray muons to partially correct anode wire signals for multiple effects as a function of time and position, including cross-connected TPC wires, space charge effects, electron attachment to impurities, diffusion, and recombination. The overall energy scale is then determined using fully-contained beam-induced muons originating and stopping in the active region of the detector. Using this method, we obtain an absolute energy scale uncertainty of 2% in data. We use stopping protons to further refine the relation between the measured charge and the energy loss for highly-ionizing particles. This data-driven detector calibration improves both the measurement of total deposited energy and particle identification based on energy loss per unit length as a function of residual range. As an example, the proton selection efficiency is increased by 2% after detector calibration.