Topics: Nick Cannon on Dating: ‘I’m Not Comfortable Being Boyfriend'
The cannon appeared in 12th century China,  probably as a parallel development or evolution of the fire-lance , a short ranged anti-personnel weapon combining a gunpowder-filled tube and a polearm of some kind.  Co-viative projectiles such as iron scraps or porcelain shards were placed in fire lance barrels at some point,  and eventually, the paper and bamboo materials of fire lance barrels were replaced replaced by metal. 
The Heilongjiang hand cannon is also often considered by some to be the oldest firearm since it was unearthed near the area where the History of Yuan reports a battle took place involving hand cannon. According to the History of Yuan, in 1288, a Jurchen commander by the name of Li Ting led troops armed with hand cannon into battle against the rebel prince Nayan. 
Chen Bingying argues there were no guns before 1259 while Dang Shoushan believes the Wuwei gun and other Western Xia era samples point to the appearance of guns by 1220, and Stephen Haw goes even further by stating that guns were developed as early as 1200.  Sinologist Joseph Needham and renaissance siege expert Thomas Arnold provide a more conservative estimate of around 1280 for the appearance of the "true" cannon.   Whether or not any of these are correct, it seems likely that the gun was born sometime during the 13th century.