The Morocco international was a driving force behind Feyenoord's campaign last season which saw them finish runners-up behind Ajax in the Eredivisie and qualify for the Champions League.
The 27-year-old becomes manager Paul Lambert's first signing with the Villa boss "looking forward to working with him" when the players report for pre-season training on Thursday.
El Ahmadi is hoping he can recreate the impact at Villa Park that he has had in Holland.
He told the club's official website: "I'm very excited about coming here to a massive club and I'm looking forward to playing here. I'm very happy that the manager wants me and that the club wants me and I'm looking forward to starting training again.
"It's nice that I am the manager's first transfer and I am looking forward to doing good things with the team and with the club this year. This club should be competing in the top half of the table and I am looking forward to achieving that with the team.
"It was always a dream of mine to play in the Premier League. We played a lot of Sundays in Holland so I was able to watch all of the games on Saturday and I think this is the best league in the world.
"It will be a challenge to show people what I can do. As a player, I always want to have the ball and that is my main quality. I always want the ball and to dictate the game.
"That's what I did at Feyenoord and hopefully I can show the fans, the club and the manager my quality."
New manager Lambert added: "Karim will help the team, I have no doubt about that. He's a really good footballer and he's played well in a good team, a big team."
Source: PA
Source: PA