First principles calculations have been used to investigate the structural phase transitions and lattice dynamics in the alloy LixNa1-xMgH3. The density functional perturbation theory and the virtual crystal approximation are employed, within the generalized gradient approximation. Our total energy and formation enthalpy results show that LixNa1-xMgH3 undergoes a phase transition from the orthorhombic Pnma phase to the polar R3c one at a lithium concentration of x = 0.7. Under pressure the system in the R3c structure exhibits a phase transition to the Pnma one and the values of the transition pressure are 0.32, 1.79 and 4.07 GPa for x = 0.7, 0.75 and 0.8, respectively. The calculated phonon dispersion curves for different lithium concentration show a softening of the B-2u mode at the one center (F point) which vanishes at x =0.8 in the polar R3c phase confirming the transition of the system from the non polar Pnma structure to the polar R3c one. The phonon frequencies at the zone center for the Raman-active and infrared-active modes are predicted for both structures for different lithium concentrations. The heat capacity is evaluated from the calculated phonon spectra and density of states in function of temperature and lithium concentration in both phases.