USA Today said the contract was for five years and $15 million.
Ujiri, a native of Nigeria, has been general manager of the Denver Nuggets since 2010. He is the first African-born general manager in the history of the NBA and was recently named the league's executive of the year for the 2012-13 season.
"To come back to the Raptors, to live in such a great city and work in an organization that has committed all the resources necessary to win championships was a huge factor in the decision," Ujiri said.
Ujiri, 42, worked for Toronto as director of global scouting in 2007 and assistant general manager from 2008-10.
Toronto went 34-48 this season, the franchise's fifth straight losing record. The Raptors have not been in the playoffs for five years.
Ray Liotta sues skin care company over use of likeness
Boston schools pull out free condoms over wrapping complaints