Hermoso joins the German champions on-loan to the end of the season.
The veteran defender had joined Roma earlier this campaign as a free agent after coming off contract at Atletico Madrid.
Hermoso told Bayer's website: "I played against this team in 2022-2023. They were two very emotional games, in which neither team gave anything away, just like in Madrid a week ago. I am looking forward to aiming for big goals with Leverkusen. Everything is ready here for a successful season on the pitch."
Simon Rolfes, the sporting director of Bayer Leverkusen, welcomed Hermoso, stating: "He is a player with great experience on the international scene and, in addition to playing as a centre-back, he is a very capable and organised left-back. Mario will bring further versatility to our defence and will compensate very well for the absence of Jeanuel Belocian".