This protocol describes a head-fixed locomotion task used to study motor learning in mice suitable for recording neuronal activity concurrently.