- Luka Modric (6' Pen)
- Rodrygo (21' Pen)
- Marco Asensio (51')
- Vinícius Júnior (61')
- Federico Valverde (71')
- Jota (84')
Goals from Luka Modric, Rodrygo, Marco Asensio, Vinicius Junior and Federico Valverde - the first two from the penalty spot - ensured the holders topped Group F with 13 points, one ahead of second-placed Leipzig with both teams reaching the round of 16.
Celtic finished bottom with two points.
"We needed a game like that, with a lot of goals, to win again, which was most important, and to top the group," Rodrygo told Movistar Plus.
"We've played a lot of games over the last month and we have two more games to go. Today we won 5-1 but it was difficult. They're a lot of games, it's tiring, and then we have the World Cup, it's a tough calendar but we have to keep going."
Modric and Rodrygo scored early goals from the spot following handballs by Celtic defenders and Asensio played a big part in the build-ups.
Five minutes into the match he found Rodrygo with a beautiful touch and the Brazilian's angled shot thundered off the post.
Valverde's strike from the rebound was deflected off the hand of a defender and Modric dispatched the spot-kick after sending the goalkeeper the wrong way.
Madrid were awarded another penalty after 18 minutes and following a VAR check Rodrygo provided another calm finish.
Asensio extended Real's lead six minutes after the break with a nice volley from a Dani Carvajal cross and 10 minutes later Valverde made a great run down the right and crossed for Vinicius to score with a close-range shot.
Valverde added the fifth with what is becoming his trademark, an unstoppable long-range strike into the top corner.
It was Valverde's fifth goal from outside the box this season in all competitions, more than any other player from Europe's big five leagues.
"We're happy. It was a good game," added Valverde, who has now scored four goals in his last five games. "We took our opportunities, and we scored the goals we had to score.
"I want to help the team and keep scoring goals, that's my way of playing, to keep running. People close to me told me I had to make the most of my shot, and that's what I've been doing. My team mates always say to me that one day I'll break the ball!"
Jota scored a consolation goal for Celtic, slotting a free kick into the top right corner five minutes from time.
Information from ESPN's Alex Kirkland was used in this report.
- Stephanie Frappart