He had one year and $4.25 million left on his contract.
"I will not complete my year left in Toronto," Garbajosa said Wednesday in a statement from the Spanish Basketball Federation. "Now I will have to see what I do in the future."
Garbajosa may consider playing for Spain in the Beijing Olympics.
Raptors general manager Bryan Colangelo flew to Madrid on Tuesday to complete the negotiations with Garbajosa, the Spanish federation and their insurance company.
"This is a joint decision for various reasons," Garbajosa said. "The more important of all is that it was the best for all parties involved."
The buyout is expect to be approved by the NBA in the next day or two.
Garbajosa joined the Raptors in 2006-07 as a 29-year-old rookie, and his season ended prematurely when Garbajosa suffered a broken leg and displaced ankle against Boston on March 26, 2007. He missed the remainder of the season and playoffs.
Garbajosa was still on the mend from his broken leg when he played for Spain in last summer's European championships, against the Raptors' recommendations and only after the Spanish federation took out a $1-million insurance policy on the forward.
The 6-foot-9 Garbajosa played only seven games last season before tests showed his injury wasn't fully healed and he underwent season-ending surgery.
The Spanish federation is happy to have the veteran back in the mix for Beijing.
"Jorge is perfectly recovered from his injury and this for us is the best news," federation president Joe Luis Saez said in a statement. "To be able to have Jorge with us is gratifying because he is a player that has given everything to the national team and he wants to continue to give it."