Nate Diaz defeated Tony Ferguson in Las Vegas by submission in the fourth round, capping a 15-year UFC career.
At UFC 279, Diaz, 37, applied a guillotine choke to his fellow American to end the fight.
Khamzat Chimaev was replaced by Ferguson on Friday after the Swedish fighter was unable to meet the weight requirement to face Diaz.
Chimaev defeated Kevin Holland via submission in the opening round of the rescheduled co-main event.
Diaz, a fan favorite due to his long career and rebellious nature, has triumphed in 16 of his 27 matches since joining the UFC at the age of 22.
The final match of Diaz’s UFC deal was the contest at the T-Mobile Arena.
Ferguson, 38, on the other hand, has competed in the UFC for 11 years and has won 15 of his 20 fights, but he entered the fight with Diaz riding a four-fight losing streak.
Throughout the entire battle, Diaz prevailed in the boxing exchanges while Ferguson countered by hitting the legs.
“All I know is it’s been a love-hate relationship with me and the UFC,” said Diaz.
“I did it today. I love the UFC. Shout out to [UFC President] Dana White. I feel like I’ve had the longest career in the UFC and the most successful one.
“I want to get out of the UFC and show all the fighters how to take over and own another sport. Boxing, kickboxing, jiu jitsu, I’m the creme de la creme right here and I’m coming for you.”