Cyclobenzaprine is commonly used to treat muscle spasms from an injury or problem that causes muscle or joint pain. Cyclobenzaprine may also be used for other conditions as determined by your healthcare provider. How does cyclobenzaprine work (mechanism of action)?