This happens often. A lot of companies have licensing requirements and if you don't meet those requirements you get let go.
I wouldn't really consider this being "fired", though - like you said. I don't think I would disclose this right away, just list the employment period and if they ask you to go into further detail in an actual interview setting, then I would elaborate. You have the right idea. I would explain it just as you said- it's difficult to study and memorize a lot of material (and the licensing exams require a TON of memorization) that you're not passionate about.
Once you're in an interview setting, you can detail that not passing those exams wasn't so much reflective of your ability but more you learning that the field wasn't something that your heart was in it might be a little bit easier for the adcom to understand.
"You may not realize it when it happens, but a kick in the teeth may be the best thing in the world for you." - Walt Disney