Superconducting AlB 2 -type silicides CaAlSi, SrAlSi, and BaAlSi ͑MAlSi͒ absorb hydrogen and form semiconducting monohydrides where hydrogen is exclusively attached to Al. This induces a metal-nonmetal transition which is accompanied with only a minor rearrangement of the metal atoms. We report the synthesis and structure determination of CaAlSiH and BaAlSiH as well as a first-principles study of the electronic structure and vibrational property changes associated with the metal-nonmetal transition. We find that incorporation of H in MAlSi removes the partly occupied antibonding ء band responsible for metallic behavior and turns it into an energetically low-lying Al-H bonding band. The fully occupied bonding band in MAlSi changes to a weakly dispersed band with Si p z ͑lone-pair͒ character in the hydrides, which becomes located below the Fermi level. The soft phonon mode in MAlSi pivotal for the superconducting properties stiffens considerably in the hydride. This mode is associated with the out-of-plane Al-Si vibration and is most affected by the formation of the Al-H bond. The mode of the Al-Si in-plane vibration, however, is unaffected, indicating that the Al-Si bond is equally strong in the metallic precursor and the semiconducting hydride. Al-H modes for MAlSiH are weakly dispersed. The frequencies of the stretching mode are around 1200 cm −1 and virtually invariant to the M environment, indicating a covalent but weak Al-H interaction, which is interpreted as a dative bond from hydridic hydrogen to Al ͓Al← H 1− ͔.