"a gun which by means of a mechanism delivers a continuous fire of projectiles," 1870, from machine (n.) + gun (n.). As a verb, "to shoot down or kill by means of a machine gun," it is attested by 1915. Related: Machine-gunned; machine-gunning; machine-gunner.
A man is entitled to the fruits of his labor, and to assert a just claim is a duty as well as a right. In the year 1861 I first conceived the idea of a machine gun, which has been ever since the great controlling idea of my life; and it certainly cannot be regarded as egotism when I express the belief that I am the originator of the first successful weapon of the kind ever invented. [R.J. Gatling, quoted in "Scientific American," Oct. 15, 1870]
Though in the light of subsequent advancements Gatling's invention of 1862 is not considered a modern machine-gun.