Having risen through the Real Madrid youth ranks, he spent a season with Bayer Leverkusen before breaking into the first team in 2013, going on to win various domestic and international honours including three Champions League trophies.
At youth international level, Carvajal won the 2011 European Championship with the under-19 team and the 2013 edition with the under-21 side. He made his senior debut in 2014.
Carvajal was born in Leganés, a suburb of Madrid. He joined Real Madrid's youth system as a 10-year-old, and continued climbing through the ranks until reaching Real Madrid Castilla in 2010.
In his first season as a senior Carvajal was immediately cast in the reserve team's starting XI, also being the team's captain. In the following campaign, he fared even better (38 games and two goals, playoffs included), as the B's returned to Segunda División after a five-year absence.
On 11 July 2012, after failing to make a single appearance for Real's first team, Carvajal signed a five-year contract with Germany's Bayer 04 Leverkusen for a transfer fee of €5 million. The Spaniards added on a buy-back clause in the region of €6.5 million if they wanted to re-sign the player after one season, €7 million after two and approximately €8.5 million after three.
Carvajal made his Bundesliga debut on 1 September 2012 in a 2–0 home win against SC Freiburg, being subsequently named to the Team of the Week. He scored his first goal for his new club on 25 November, netting the second in an eventual 2–1 success at TSG 1899 Hoffenheim.
Carvajal was selected as one of the three best right backs at the end of his first and only season, behind FC Bayern Munich's Phillip Lahm and FC Schalke 04's Atsuto Uchida. He received 16% of the total vote from the fans.
On 3 June 2013, Real Madrid exercised its buy-back option on Carvajal, who became the team's first signing for 2013–14 for a fee believed to be in the region of €6.5 million. This was confirmed by Bayer's director of football Rudi Völler, who stated: "Real Madrid noticed the outstanding performances by Dani this season, and it was only a matter of time before they exercised their buy-back option." Shortly after the move, he spoke of his happiness to return, thanking the president, the fans and the club at a press conference.
Carvajal made his La Liga debut on 18 August 2013, in a 2–1 home win against Real Betis. One month later he played his first match in the UEFA Champions League, again featuring the full 90 minutes in a 6–1 away routing of Galatasaray SK for the group stage.
Carvajal appeared in 45 matches in his first season and scored twice, in the league against Rayo Vallecano and CA Osasuna. He added 120 minutes in the Champions League final, a 4–1 triumph over Atlético Madrid.
Carvajal started in Real Madrid's triumphs in the 2014 UEFA Super Cup over compatriots Sevilla FC, and in that year's FIFA Club World Cup final against Argentina's San Lorenzo de Almagro. In the first leg of the Champions League's semi-finals, on 5 May 2015, he conceded a penalty by fouling Carlos Tevez, with the Juventus F.C. forward converting the spot-kick to defeat the Spaniards 2–1.
On 8 July 2015, Carvajal signed a new deal with the Merengues until 2020. He contributed with eight appearances and one goal in the campaign's Champions League, as the tournament ended in win; in the final against Atlético Madrid, he retired injured early into the second half of a 1–1 draw (penalty shootout triumph).
On 9 August 2016, Carvajal started in the UEFA Super Cup clash against Sevilla in Trondheim, and scored the final 3–2 in the 119th minute after an individual effort. During the league season, in spite of several physical ailments, he still contributed with 23 games to help the team be crowned champions. After nearly one month on the sidelines, he returned to action just in time to start at the Champions League final on 3 June, which they won for the third time in four years.
His contract was extended to 2022 on 17 September 2017.
Carvajal acted as backup to FC Barcelona's Martín Montoya at the 2013 UEFA European Under-21 Championship, playing in the 3–0 group stage win against the Netherlands as Spain went on to win the tournament. He was selected by full side manager Vicente del Bosque for his 30-man provisional squad for the 2014 FIFA World Cup, being excused alongside all other Real Madrid and Atlético Madrid players from the warm-up game against Bolivia on 30 May due to the Champions League final, and being omitted from the final list the following day.
On 29 August 2014, Carvajal was called up to the squad for the first time, for matches against France and Macedonia. He made his debut on 4 September, in a 0–1 friendly defeat to the former in which he played the full 90 minutes; he was also selected for the UEFA Euro 2016 tournament, being dropped from the squad after an injury contracted whilst with his club.As of 20 September 2017
1 Includes Supercopa de España, UEFA Super Cup and FIFA Club World Cup.Real Madrid Castilla
Segunda División B: 2011–12
La Liga: 2016–17
Copa del Rey: 2013–14
Supercopa de España: 2017
UEFA Champions League: 2013–14, 2015–16, 2016–17
UEFA Super Cup: 2014, 2016, 2017
FIFA Club World Cup: 2014, 2016
UEFA European Under-21 Championship: 2013
UEFA European Under-19 Championship: 2011
La Liga: Team of The Year 2016–17
UEFA Champions League: Team of the Season 2013–14, 2016–17