Thanks for the reply!
It's a Yamaha CLP-970A digital piano, connected via MIDI cable (10 foot Monoprice cable) to the M-Track, which is in turn connected via USB (using the cable included with the M-Track) to the Mac (directly, no hub).
I'm using the digital piano as a MIDI controller, with software instrument tracks in Logic. The distortion happens no matter what software instrument I choose, and turning down levels doesn't help. I'm monitoring on headphones connected to the M-Track, with all levels turned way down. When I switch to monitoring on the same headphones connected to the Mac, it sounds clean. I do use an eighth-inch to quarter-inch adapter to plug the headphones into the M-Track, but this works fine when connected to other sources.