Electrical performance and oxygen relaxation behaviour in $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x }$$ compounds were investigated. The oxide ion conductivity of $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x }$$ compounds increased first and then decreased with increasing Mg-doped content. The highest oxide ion conductivity of $$4.7\times 10^{-3}$$ S $$\hbox {cm}^{-1}$$ at 773 K was observed for the $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{0.96}\hbox {Mg}_{0.04}\hbox {O}_{2.96}$$ compound. A typical relaxation peak in the $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x}$$ samples was observed. The activation energy and pre-exponential factors were determined as ( $$1.0~\hbox {eV}, 4.7\times 10^{-16}$$ s) and ( $$0.94{-}1.0~\hbox {eV}, 6.8\times 10^{-14}{-}3.1\times 10^{-13}$$ s) from internal friction and dielectric relaxation measurement, respectively. The lower oxide ion conductivity in $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x}$$ ( $$x=0.06$$ , 0.08, 0.10) compounds may arise from the lower vacancy mobility. Judging from the electrical performance and relaxation parameters, although lower-level Mg-doping can improve oxide ionic conductor, oxygen vacancy mobility in $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x }$$ compounds cannot be improved with increasing Mg-doping content. These results will be meaningful to ameliorate the electrical properties of $$\hbox {Na}_{0.5}\hbox {Bi}_{0.5}\hbox {Ti}_{1-x}\hbox {Mg}_{{x}}\hbox {O}_{3-x}$$ compounds and understand the relationship between the electrical properties and structure.