We study the electronic structure and lattice dynamics in the ferromagnet MnBi using first-principles calculations and a tight-binding model. The band structure around the Fermi level is dominated by Bi-p states which are the primary contributors to the magnetic anisotropy energy in the low temperature structure. A tight-binding model consisting of Mn-d and Bi-p states is developed and the parameters are determined from first-principles calculations. Phonon dispersions and elastic moduli exhibit several interesting features. The results imply that the magnetic interaction with the crystal lattice in MnBi is considerably more complex than previously thought and in particular that there is a rich interplay between phonons and magnetism involving both magnetoelastic and magnetostrictive coupling.