If you don't know, there are two ways to spell México, with the second way being Méjico.
While I was aware of the difference in spelling, I had no idea why there were 2 spellings, and never really put much thought into it. But thanks to my maestra and Google, the mystery has been unraveled.
The word México is deeply intertwined with the history of the Mexican people, taken from the language of the Nahua Aztec tribe, also known as the Mexicas, who spoke Nahuatl.
In short, the word México comes from the language of the Mexicas (Aztecs), Nahuatl. So now that I've given you a very abbreviated history of the word "México", then where does "Méjico" come from?
Méjico is the spelling given to us by modern day Spanish, although the Real Academia de la Lengua Española does recognize both spellings.
So then the question becomes, which one do I use, or does it even matter?
Mexicans will use México because of the historical and cultural ties, but in Spain the standard is Méjico. Which one you use is up to you. If the Spanish of Spain is going to be your forte, then perhaps going with "Méjico" is your best option.
My explanation here barely scratches the surface of what can be a touchy subject for some people. If you want to know more, here are a few links that might be of interest:
WordReference - México vs Méjico
I hope you enjoyed this brief history lesson.