Diouf has attracted the attention of foreign clubs for quite some time. Crystal Palace made an offer for him in the winter, but they could not reach an agreement with Slavia.
And the interest in the young defender did not wane; on the contrary. Premier League clubs became even more focused after Senegal's 3-1 win over England in June, in which Diouf shone.
West Ham eventually succeeded in the battle for the talented player, offering Slavia 22 million euros and another four million in bonuses, according to the infotbal.cz website.
The Prague club also has the option to receive a percentage of any further sales. This is a record transfer from the Czech league. The London club agreed on a long-term contract with the player. The defender will play in the number 12 shirt.
"I am really happy to be here and to take the next step in my career. I'm looking forward to working hard and getting to know my new teammates," Diouf said after the transfer.
"Several clubs were interested, but West Ham was my first choice. I spoke to Coach Potter, and the plan presented made a lot of sense," he added.
Diouf described the Premier League engagement as the pinnacle of his career: "It's everyone's dream. When you get there, you have to show your best. The important thing is to keep your personality, but always think about the team.
"I want to say to the West Ham fans that I am happy to be here and I believe we are going to have a great season."
Head coach Graham Potter also did not hide his satisfaction with the new signing: "We have been watching El Hadji for quite some time. He's a strong character; he left Senegal at a young age for Norway and then to Prague, where he delivered consistently good performances.
"The Premier League will be a challenge for him, but he is ready for it - hungry, ambitious and determined to fit into our team," the English coach added.
Diouf joined Slavia at the start of 2024 from Tromso in Norway and gradually worked his way into one of the key men of their squad. The Ziguinchor native played a total of 50 competitive matches for the Prague club, scoring nine goals and setting up four more for his teammates.