Diop was born in Toulouse, Haute-Garonne and played youth football for Balma SC before moving to Toulouse FC in 2006. He began training with the first team in September 2015, and signed a professional contract in November. He was part of an influx of young players to the squad that included Alban Lafont, Zinédine Machach, Alexis Blin and Yann Bodiger. He made his Ligue 1 debut, aged 18, on 28 November 2015 against Nice, playing the full game alongside fellow debutant Lafont. He scored his first goal in his second appearance on 2 December 2015, contributing to his club's 3–0 win away to fellow relegation strugglers Troyes. He made 21 appearances in his first season, helping the club to eight clean sheets. He was sent off twice during a season in which the club only avoided relegation with a win on the final day. Diop made 30 Ligue 1 appearances in 2016–17. He was named captain of his local club for the first time in April 2017. The 2017–18 season saw Diop become club captain in October. Toulouse reached the quarter-finals of the Coupe de France, but again struggled in the league, avoiding relegation after a play-off victory against AC Ajaccio in May 2018.
On 19 June 2018, Premier League club West Ham United confirmed the transfer of Diop, who signed a five-year contract. The fee, reported by British media as £22 million, was not disclosed but was announced as a club record, beating the previous record of £20 million set in July 2017 with the signing of Marko Arnautović. Diop made his Premier League and West Ham debut on 25 August. In a 3–1 away defeat by Arsenal, he scored an own goal and in doing so became the first West Ham player to score an own goal on his debut in the Premier League. Three days later, Diop scored his first goal for the club, in an EFL Cup game against AFC Wimbledon after conceding a goal after only 72 seconds, Diop scored an equalising goal for West Ham who went on to win 3–1. He won early season praise for his performances particularly against Arsenal and against Manchester United whose manager, José Mourinho commended Diop's performance in West Ham's 3–1 win over his club and of the scout who had identified the potential of Diop. On 22 February 2019, Diop scored his first Premier League goal in a 3–1 home win against Fulham.
Diop, at in height, has been credited as being "a tremendous athlete, excellent in the air and quick across the ground" by football magazine FourFourTwo. He has played mainly as a right-sided centre-back. Along with the two red cards received in 2015–16, Diop amassed 25 yellow cards over the course of his three seasons at Toulouse.
Personal life
Diop's grandfather, Lybasse Diop, played for Bordeaux and was the first Senegalese footballer in Ligue 1. He is also of Moroccan descent through his mother.