The 25-year-old, who can play both in midfield or as a full-back, has fallen down the pecking order at the Emirates Stadium in recent seasons and spent the second half of last term on loan at Roma.
Maitland-Niles helped Jose Mourinho's side to lift the Europa Conference League during his time in the Italian capital, but he has once again been deemed surplus to requirements by Arsenal boss Mikel Arteta this season.
The five-time England international will spend the 2022-23 campaign at St Mary's, becoming the club's seventh signing of the summer window.
"Ainsley is at a good point in his career, with a lot of experience already, but he is also still a player with potential, and he is someone who can definitely help us," manager Ralph Hasenhuttl told the club's official website.
"I think he fits well with us and can develop his game even further during his time here. He can also play in different positions, which is always a good thing, and I am pleased to welcome him as part of our squad."
Maitland-Niles could make his debut for the Saints when they face Wolverhampton Wanderers at Molineux on Saturday.
Southampton, who have won two of their opening five games of the season, have also been heavily linked with a move for Duje Caleta-Car on deadline day.
The South Coast outfit have spent more than £50m on reinforcements this summer, bringing in Gavin Bazunu, Armel Bella-Kotchap, Romeo Lavia, Joe Aribo, Sekou Mara and Mateusz Lis.