The 20-year-old has signed a five-year contract with the German giants.
Carvajal decided to leave Real Madrid in order to get regular first-team football.
Real Madrid have a buy-back clause, that could see the youngster return to Spain within three years.