This is less of a historical question than an etymological one, but I'll field it based on my knowledge of Chinese and some quick research. The short answer is that Meiguo (美国) is a contraction of Meilijian Hezhongguo (美利坚合众国), "United States of [Chinese transliteration of "American"]." The characters used to transliterate "American" mean "beautiful," "benefit/profit," and "strong/firm," respectively, so Meiguo can be read literally as "beautiful country" but this is not intended as a meaningful name.
When transliterating foreign words and names, the Chinese convention is to use easily-recognizable, high-frequency characters that have positive (or at least neutral) connotations to represent the foreign language's sounds. From there another convention is to further contract them down to one element plus a character representing "country," "state," "city" or the like. To give an example, Germany can be rendered as Deyizhi (德意志) from Deutsch, the characters meaning "virtue/ethics," "idea/intention," and "will/aspiration," but it is most often referred to as Deguo (德国) which can be taken literally as "virtuous country."
These names seem to have become standard over the course of the 20th century, prior to which there were numerous alternate renderings.