Hmm, sorta.
New Mexico wasn't a state until 1912, but New Mexico as a name existed before that (since early 16th Century), applying to that general area.
Mexico the country gained independence from Spain in 1821, but the name derives from the local name for the central area of the Aztec empire, way, way before that.
Since the name for the area of New Mexico was named after the original Mexico, and didn't exist as a state until well after Mexico became a country, I would say the claim is highly dubious.
(source: Wikipedia)