American Cejudo, 32, battled back after a torrid opening round to dramatically turn the contest in his favour, as he closed the distance on his opponent and found success with his close-range boxing and Muay Thai knees.
Eventually, Moraes, who had loaded up with heavy strikes early in the fight, began to tire and Cejudo finished his opponent with ground strikes with nine seconds remaining in the third round.
Cejudo's victory meant he became only the fourth athlete - after Conor McGregor, Daniel Cormier and Amanda Nunes - to hold two UFC world titles simultaneously.
It is a status known to fight fans as being a "champ champ", but Cejudo gave himself a different label after his historic victory.
"No, I'm not champ champ, ladies and champion. My name is 'Triple C'. Olympic champion, flyweight champion of the world and now bantamweight champion of the world.
"I am the greatest combat athlete of all time."
Cejudo captured a gold medal in freestyle wrestling at the 2008 Olympic Games in Beijing and transitioned to mixed martial arts five years later.
After his first attempt to win a UFC world title ended in a knockout loss to then-flyweight champion Demetrious Johnson in 2016, Cejudo went back to the drawing board and defeated Johnson in a rematch to win the title two years later.
He then turned back the challenge of then-bantamweight champion TJ Dillashaw with a 32-second knockout and, after Dillashaw was stripped of his title for testing positive for blood booster EPO, faced top bantamweight contender Moraes for the vacant bantamweight title in Chicago.
After his win, Cejudo sent a message to UFC president Dana White, saying: "Wherever you are, I have a hit list. But I want to start getting paid. I want to start making heavyweight money."
Shevchenko delivers highlight-reel finish
Valentina Shevchenko was making her first defence of the UFC flyweight title she won in December
The night's co-main event produced one of the most spectacular knockouts in women's MMA history as reigning UFC women's flyweight world champion Valentina Shevchenko stunned number-one contender Jessica Eye with a stunning head kick KO 26 seconds into the second round of their title fight.
Kyrgyzstan's Shevchenko was a huge 1/14 favourite to retain her title against American Eye, and made good on the bookmakers' confidence as she connected cleanly with a left high kick to retain the title she won against Poland's Joanna Jedrzejczyk at UFC 231 last December.
Ferguson's winning run continues
Donald 'Cowboy' Cerrone was back in the octagon less than five weeks after defeating Al Iaquinta
Former UFC interim lightweight champion Tony Ferguson claimed a crucial victory over fellow contender Donald 'Cowboy' Cerrone in their eagerly-anticipated main card clash, but it didn't pan out in the way anyone had hoped.
After a back-and-forth battle over the first two rounds - and a controversial late punch by Ferguson at the end of round 2 - Cerrone made a critical error before the start of the third round when he blew his nose.
It saw Cerrone's already swollen right eye close up immediately forcing a premature end to the contest, with UFC president White later confirming that Cerrone had been transported to hospital with a broken orbital bone.
The TKO victory for Ferguson extends his win streak in the UFC to 12 fights and puts him in pole position to face the winner of the UFC 242 title fight between Khabib Nurmagomedov and Dustin Poirier in Abu Dhabi.
Mixed results for British stars
Darren Stewart was one of two Britons to feature on the fight card alongside Scotland's Joanne Calderwood
Earlier in the night it proved to be a mixed night for the two British fighters in action in Chicago.
Middleweight Darren Stewart picked up a hard-earned unanimous decision victory over American prospect Bevon Lewis, while Scotland's Joanne Calderwood was edged out on the scorecards by number two-ranked flyweight contender Katlyn Chookagian.