City's Argentinian defender Nicolas Otamendi will go the other way in a separate transfer for 15 million euros, Benfica said.
Benfica confirmed the transfers in a statement on Sunday but said the players would still need to sign their respective contracts.
Dias, 23, has made 137 appearances during a four-year spell with the Portuguese club, winning the league title in 2018-19. He has won 19 caps for Portugal and was part of the side that lifted the UEFA Nations League trophy last year.
His arrival will help shore up a leaky City defence, which shipped five goals to Leicester City on Sunday.
Dias will be City's fifth signing of the summer, following the arrivals of Pablo Moreno, Ferran Torres, Nathan Ake and Scott Carson.
Otamendi, 32, won two Premier League titles and an FA Cup with City and leaves after five seasons. Reuters