The version of this I heard is that the first air-to-air shots were fired during the Border War (US / Mexico) in around 1911 or 1912. Somebody unloaded his six-shooter and didn't hit a darn thing.
Just before WWI, Caproni designed an airplane with a machine gun mounted above the propeller [0], but the military wasn't that interested in it. It wasn't until the invention of the interrupter gear (credited in part to Roland Garros and part to Anthony Fokker) that air-to-air combat got to be really deadly, on account of pilots being able to fire accurately at other aircraft.