In front of an expectant Bernabeu crowd, Cristiano Ronaldo headed Real into a 21st-minute lead before doubling his tally in the second half after a magnificent rabona cross by Angel Di Maria.
Di Maria wasted numerous chances but added two goals of his own in the final 20 minutes as Real stretched their scoring streak in consecutive Champions League matches to 27.
Pepe, who received a nasty knock in a clash of heads during the game, praised Real's desire to win against a side who picked up a point against Juventus on matchday one in Group B.
He said: "The key was the desire we put into the match.
"The whole team has worked hard to win the game, and that makes the job easier.
"Copenhagen won a point against Juventus and they are a strong team."
Real coach Carlo Ancelotti felt that his side played with more intensity than in their 1-0 derby defeat to Atletico Madrid on Saturday.
Victory leaves Ancelotti's men four points clear of nearest group rivals Juve with two games gone.
He said: "It was a good game.
"We started well with intensity and balance. We modified the system to use the flanks more and to create more open spaces.
“We slowed a bit down after Cristiano's (first) goal, though. We always have to try to finish first of the group because it will boost our confidence."
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.