electromyography (ee-LEK-troh-my-AH-gruh-fee) (EMG): a test used to detect nerve function. It measures the electrical activity generated by muscles.