Inducted into the UFC Hall of Fame in May 2010, Hughes last fought at UFC 135 in September 2011 when he was knocked out in the first round by Josh Koscheck.
The 39-year-old fighting famer from Hillsboro, Ill., retires with a 46-9 record. He lost his 170-pound title to Canadian Georges St-Pierre at UFC 65 in November 2006.
His 11-year UFC career dates back to UFC 22 and featured seven title defences.
"Matt is one of those guys that was there from the early days and helped grow MMA to the modern, professional sport it is today," UFC president Dana White said in a statement. "He has been in the sport since the late 1990s and really seen it all."
In announcing his appointment, the UFC also cited the introduction of "a clear set of athlete guidelines, or conduct policy, memorializing the values long held by the organization."
"Hughes will be an invaluable resource for UFC athletes," UFC COO Lawrence Epstein said in a release. "Leveraging the background and expertise he gained over a Hall of Fame career, Hughes will be dedicated to providing guidance on a wide range of issues athletes face inside and outside of the Octagon.
"This includes understanding the heightened social responsibility that comes with being in the public eye, to best practices when dealing with endorsements or managing finances, to the basic daily challenges of staying healthy during training, as well as the need to steer clear of illegal and/or performance-enhancing drugs."
The UFC has not revealed the code of conduct, saying it is "an internal document."
Hughes will also work state athletic commissions and international federations.