Mexico was the closest hemisphere nation to the United States and had just recently experienced the Mexican-American War from 1846 to 1848. During the war, Mexico lost nearly half of its land and was resentful of the United States. Germany saw an opportunity to exploit Mexico's desire to regain its lost territory and encouraged Mexico to fight against the United States.
This incident is known as the Zimmerman telegram.