The 21-year-old right-back, a product of Real's academy and a Spain Under-21 international, has agreed a six-year contract, Real said in a statement on their website.
Carvajal was voted the best right-back in the Bundesliga by German daily newspaper Bild last season, when he scored one goal and made seven assists for Leverkusen. He will compete with Spain international Alvaro Arbeloa for the right-back slot.
"He [Carvajal] has made the definitive jump in quality in the Bundesliga and has established himself as one of the most promising defenders in Spanish football," Real said.
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.