The 43-year-old had been splitting his time between Villa and his job as Martin O'Neill's number two with the Republic of Ireland.
It was thought he went to Villa Park hoping to walk into Paul Lambert's job, but that didn't happen.
Keane said in a statement: "Ultimately, my roles with Villa and Ireland and combining my commitment to these have become too much.
"It isn't fair to either Villa or Ireland, so I've made this decision.
"I'd like to thank Paul for giving me a great opportunity to come to a brilliant football club, I've really enjoyed my experiences at Villa and I wish the management team, the players, the supporters and the club nothing but the best going forward."
Paul Lambert: "Roy came to me this morning and he informed me that, ultimately, the difficulty of combining both roles has prompted his decision, which I respect totally.
"In the brief period we have worked together he has been great in the role and I understand his reasons for leaving."