Elmohamady, 29, is reunited with former boss Steve Bruce after Villa activated a release clause in his Hull contract.
The Egyptian international made 218 appearances and scored 12 goals for the Tigers after initially joining them on loan from Sunderland in 2012.
He is Villa's third summer signing following former England captain John Terry and goalkeeper Sam Johnstone.
Elmohamady formerly played under Bruce for both Sunderland and Hull.
The Egyptian, who can play at both right-back and right midfield, helped win promotion from the Championship for Bruce's Hull side in both the 2012-13 and 2015-16 seasons.
Find all the latest football transfers on our dedicated page.
Aston Villa have signed full-back Ahmed Elmohamady from Hull City for £1m on three-year contract.