Definition. 1  Electromyography (EMG) is an electrical recording of muscle activity that aids in the diagnosis of neuromuscular disease. 2  Muscles are stimulated by signals from nerve cells called motor neurons. This stimulation causes electrical activity in the muscle, which in turn causes contraction. This electrical activity is detected by a needle electrode inserted into the muscle and connected to a recording device. Together, the electrode and recorder are called an electromyography machine.