A detailed ab initio study of the electronic properties of the Al-doped MgB2 compound is reported. The E-2g phonon frequency is calculated as a function of the Al content within linear-response theory. Our results show that a strong phonon frequency renormalization starts at 25% Al content, explaining the phonon frequency behavior as a function of Al doping reported by different experiments.