There are certain references in Ancient Puranas regarding use of fire arms. But we don't have solid proof regarding this as puranic stories are either called as symbolic or myths.
But Chanakya aka Kautilya -the ancient genius on politics,economies and strategies mentions the use fire arms.The proximity of India to China(land of gun powder) also plays an important factor about Firearms in ancient times.
It would be interesting to examine the true nature of the agneya-astras. Kautilya describes agni-bana, and mentions three recipes - agni-dharana, ksepyo-agni-yoga, and visvasaghati. Visvasaghati was composed of 'the powder of all the metals as red as fire or the mixture of the powder of kumbhi, lead, zinc, mixed with the charcoal and with oil wax and turpentine.' From the nature of the ingredients of the different compositions it would appear that they were highly inflammable and could not be easily extinguished.
A recent writer remarks:
'The Visvasaghati-agni-yoga was virtually a bomb which burst and the fragments of metals were scattered in all directions. The agni-bana was the fore-runner of a gun-shot.....
Sir A. M. Eliot tells us that the Arabs learnt the manufacture of gunpowder from India, and that before their Indian connection they had used arrows of naptha. It is also argued that though Persia possessed saltpetre in abundance, the original home of gunpowder was India. It is said that the Turkish word top and the Persian tupang or tufang are derived from the Sanskrit word dhupa. The dhupa of the Agni Purana means a rocket, perhaps a corruption of the Kautaliyan term natadipika.
(source: Fire-Arms in Ancient India - By Jogesh Chandra Ray I.H.Q. viii. p. 586-88)