In December 2013, it was announced that Lima would a cast member on , representing Team Edgar at middleweight. Over the course of the show, Lima first defeated Tim Williams in the quarterfinals via submission. In the semifinals, Lima went on to defeat Roger Zapata via submission to reach the finals.
Ultimate Fighting Championship
Lima made his official UFC debut facing fellow castmate and Team Edgar teammate Eddie Gordon in the middleweight finals on July 6, 2014. Lima lost the fight via knockout in the first round. Subsequently, Lima was awarded both Performance of the Season bonuses for his submission finishes during the season. Lima was expected to face Pawel Pawlak in a welterweight bout on November 8, 2014 at UFC Fight Night 56. However, Pawlak was forced to pull out of the fight due to injury and replaced by Jorge de Oliveira. Lima won the fight via unanimous decision. Lima faced Tim Means on February 28, 2015 at UFC 184. Means won the fight via first-round TKO. Lima filled in as a short notice replacement against Li Jingliang on May 16, 2015 at UFC Fight Night 66, replacing Roger Zapata. He lost the fight by knockout in the first round. On July 5, 2015, Lima confirmed his release from the UFC.
''The Ultimate Fighter: Redemption''
In February 2017, it was revealed that Lima would compete again on the UFC's reality show in the 25th season on . Lima was the fourth pick overall for Team Dillashaw. He faced Hayder Hassan in the opening round and won by unanimous decision. He faced Gilbert Smith in the quarter finals, winning the bout in a third round sudden death victory. Smith announced his retirement after the loss to Lima. In the semi-finals, Lima faced teammate Tom Gallicchio and won by unanimous decision to be the first fighter in the finals.
UFC return
Three years after his first stint on the show, Lima faced teammate Jesse Taylor in the finals on July 7, 2017 at. He lost the back-and-forth fight via rear-naked choke submission in the second round. Lima faced Yushin Okami on April 14, 2018 at UFC on Fox 29. He lost the fight via unanimous decision. Lima faced Chad Laprise on December 8, 2018 at UFC 231. He won the fight by knockout in the first round. As the last fight of his The Ultimate Fighter contract, Lima faced Court McGee on April 27, 2019 at. He won the fight via split decision. After the McGee fight, Lima signed a new contract with the UFC and faced Luke Jumeau on October 6, 2019 at UFC 243. He won the fight via split decision. Despite the win, Lima's manager revealed that they are going to appeal the split decision to be turned to unanimous. Lima was scheduled to face Alex Morono on February 8, 2020 at UFC 247. However on January 22, 2020, Lima was forced to withdraw from the bout due to a neck injury.