No. Citadel XP bonus only applies to Siege units. The MG is a Gunpowder unit. There is a entry on the Civ Wikia that says the MG is Siege but that is incorrect.
Many people still (me included) are sometimes frustrated because the Civpedia lists just some units as "gunpowder" units, but actually for city defense value purpose all the units which require "gunpowder" tech as a prerequisite no matter exactly where in the tech chain are treated as "gunpowder".