The 28-year-old has recently been linked with the likes of Chelsea and Manchester United.
“The negotiations with Pepe are going well,” Real Madrid director general Jorge Valdano said.
“He is an excellent person and one of the best central defenders in the world.
“It is true that we have been talking for some time, but I am confident that he will choose to stay on at Real Madrid.”