Electromyography (EMG) methods allow quantitative analyses of motor function. The techniques include intramuscular recordings that are performed in vivo. However, recording muscle activity in freely moving mice, particularly in models of motor disease, often creates challenges that prevent the acquisition of clean signals. Recording preparations must be stable enough for the experimenter to collect an adequate number of signals for statistical analyses. Instability results in a low signal-to-noise ratio that prohibits proper isolation of EMG signals from the target muscle during the behavior of interest. Such insufficient isolation prevents the analysis of full electrical potential waveforms. In this case, resolving the shape of a waveform to differentiate individual spikes and bursts of muscle activity can be difficult. A common source of instability is an inadequate surgery. Poor surgical techniques cause blood loss, tissue damage, poor healing, encumbered movement, and unstable implantation of the electrodes. Here, we describe an optimized surgical procedure that ensures electrode stability for in vivo muscle recordings. We implement our technique to obtain recordings from agonist and antagonist muscle pairs in the hindlimbs of freely moving adult mice. We validate the stability of our method by holding EMG recordings during dystonic behavior. Our approach is ideal for studying normal and abnormal motor function in actively behaving mice and valuable for recording intramuscular activity when considerable motion is expected.