The Moroccan midfielder has spent time with Real Salt Lake, Colorado and New York since being drafted second overall in the 2006 MLS SuperDraft.
The seven-year MLS veteran has 13 goals and 24 assists in 174 career games with three different clubs. Ballouchy scored four goals and notched four assists in 51 appearances with the New York Red Bulls.
“I’ve admired his play over the seven years he’s been in the league,” said Earthquakes head coach Frank Yallop. “He’s steadily improved since joining MLS. Mehdi’s a good player, a great addition to our team and we’re looking forward to having him here in San Jose.”
The 29-year-old Moroccan was acquired by the Red Bulls in September 2010. This season, Ballouchy made 16 appearances and 10 starts, recording one goal and two assists.
“We want to thank Mehdi for his service to the Red Bulls,” Red Bulls general manager and sporting director Erik Soler said. “It was a difficult decision to let Mehdi go. However, trading him provides us additional roster and financial flexibility moving forward.”