Lloyd has served as an assistant on Mark Few's staff since the 2001-02 season. Arizona will be Lloyd's first head coaching role.
He'll replace Sean Miller, who was fired April 7 after 12 seasons with the Wildcats.
"I am extremely grateful to president (Robert C.) Robbins and (director of athletics) Dave Heeke for the incredible opportunity to lead one of the country's most storied men's basketball programs," Lloyd said in a statement. "While there are certainly potential obstacles ahead for our program, I embrace the challenge as we will build on the foundation in place to compete for Pac-12 and national championships.
"I know how much Arizona Basketball means to the institution, its fans, its community, and the state, and I cannot wait to get started. That work begins now."
Lloyd edged Pacific head coach Damon Stoudamire, Arizona assistant Jason Terry, Georgia Tech head coach Josh Pastner, and Los Angeles Lakers assistant Miles Simon for the opening, reports CBS Sports' Matt Norlander. All four of the aforementioned candidates are Arizona alumni.
"We are thrilled that Tommy and his family are joining the Wildcat family and re-establishing our men's basketball program among the elite in the nation," Heeke said. "After speaking with a tremendous pool of candidates, and with so many in and out of the college basketball world, it became clear that Tommy has the passion, the experience, the knowledge, the coaching and recruiting acumen, and the drive to lead us to championships."
Lloyd is renowned for his work as a recruiter, specifically involving international prospects. The 46-year-old played a key role in securing commitments from several eventual NBA players, including Rui Hachimura, Domantas Sabonis, and Brandon Clarke, among others.
He was contractually set to take over as Gonzaga's head coach whenever Few retired.
The Bulldogs won the WCC Tournament title 15 times during Lloyd's 21 seasons on Few's staff. Gonzaga also made the NCAA Tournament nearly every year during that span, with its only absence coming in 2020 due to the competition's cancellation.