Ford averaged 12.2 points and a team-high 6.6 assists in 72 games last season following a spinal-cord injury that sidelined him for a season and a half.
"He was an inspiration to all of us when he found the will and strength to fight back from the neck injury he suffered during his rookie season," Bucks general manager Larry Harris said. "We wish him much success in Toronto."
The 6-foot Ford was the No. 8 pick in the 2003 draft.
With the addition of the former Texas player, the Raptors are better protected at point guard if starter Mike James leaves through free agency. The trade follows Toronto's decision to select 7-foot Italian forward Andrea Bargnani with the No. 1 overall pick in the draft, a move that made it easier to give up Villanueva.
"We are sorry to see Charlie leave, but getting better comes at a cost," Raptors president and general manager Bryan Colangelo said. "T.J. Ford's best attributes, quickness and playmaking, are a perfect fit for our team."
Harris hopes Villanueva will fill the team's need for a power forward to complement 7-foot center Andrew Bogut, the top pick in the 2005 draft.
The 6-foot-11 Villanueva, selected seventh overall in the 2005 draft, averaged 13.0 points and 6.4 rebounds in 81 games for the Raptors. The former Connecticut star set Toronto rookie records for points with 48 on March 26 at Milwaukee and rebounds with 18 on April 2 against New Orleans.
"Acquiring Charlie takes care of a primary need we had going into the summer," Harris said. "He's a gifted power forward who knows how to score both inside and outside. ... The outstanding rookie season he had last year is only the beginning of what he's capable of achieving."
The Bucks, with a revamped roster and Ford as the floor leader, reached the playoffs with a 40-42 record last season. It was a 10-game improvement from the previous season when they didn't make the playoffs.
In the playoffs, they lost 4-1 to Detroit in the first round.
"If you looked at our roster, we truly needed a 4 man. Now we've solidified the power forward position," Harris told reporters at a hastily called news conference.
With Ford gone, the Bucks will have to rely on Mo Williams and Charlie Bell at point guard, barring another move. All three saw playing time at the point last season.
"I'm very confident in Mo and Charlie for next year," Harris said.
He said a likely starting lineup next season would include guards Williams and Michael Redd, forwards Bobby Simmons and Villanueva, and Bogut at center, although coach Terry Stotts would make the final decisions on the lineup.
Ford was surprised when informed of the move, Harris said.
"I think obviously he was a little shocked in the beginning," Harris said. "Then he thanked me and he thanked the city for all of the support these last couple of years."
According to Harris, the discussions with Toronto started about Milwaukee's veteran center Jamaal Magloire, who has been mentioned as a possibility for a trade, and they evolved into the deal that was announced Friday night.