Carlos is set to travel to England for a medical before agreeing personal terms with the Premier League club.
The 29-year-old centre-back played 136 matches for Sevilla, helping them win the 2020 Europa League.
He had been in talks with Newcastle during the January window, but a deal could not be reached.
“Aston Villa can confirm the club has reached an agreement with Sevilla FC for the transfer of Diego Carlos for an undisclosed fee,” a Villa statement said on Thursday.
“The player will travel to England in the next few hours to complete a medical and finalise personal terms.”
Carlos joined Sevilla in 2019 from French club Nantes and was part of the Brazil squad which won gold at the Tokyo 2020 Olympics.
“Sevilla FC would like to thank the player for his work during all these years in Seville and wishes him the best of luck in his new journey,” a statement from the La Liga club read.
Carlos will be Villa manager Steven Gerrard’s latest signing since the domestic season ended on Sunday.
Villa have already tied up a deal for French midfielder Boubacar Kamara, who will join on a five-year deal from Marseille after his contract expires in the close-season.
Gerrard also recently landed Philippe Coutinho on a permanent transfer after the Brazil playmaker’s successful loan from Barcelona in January.