The French winger moves to Villa Park for an undisclosed fee after spending four seasons at the Bay Arena.
Diaby joined Leverkusen from Paris Saint Germain in the summer of 2019 and went on to make 173 appearances, scoring 49 goals and providing 48 assists.
The 24-year-old joins Youri Tielemans and Pau Torres as Unai Emery's summer recruits for the upcoming season.
A statement on the Villa website read: "Aston Villa is delighted to announce the signing of French international Moussa Diaby.
"The 24-year-old winger joins Villa from Bayer Leverkusen for an undisclosed fee and has already linked up with his new team-mates on their tour of the United States.
"Diaby, who has 10 international caps for France, started his career with hometown club, Paris Saint-Germain, graduating from the youth ranks into the first team."
"I will always look back happily and gratefully on my time in Leverkusen," said Diaby. "Now I want to take the next step, start a new chapter."
Leverkusen sporting Simon Rolfes added: "Moussa Diaby developed into a fantastic player during his time at Bayer 04."
"The level of professionalism and determination with which he went about his job every day was truly exceptional.
"With his special style of play and enormous speed, Moussa has left his mark on our team in recent years. He is a person who has his heart in the right place."