The earliest documentation of fireworks dates back to 7th century China (time of the Tong Dynasty), where they were invented. The fireworks were used to accompany many festivities. Chinese people originally believed that the fireworks could expel bad ghosts and bring about luck and happiness. It is thus a part of the culture of China and probably had its origin there; eventually it spread to other cultures and societies. The art and science of firework making has developed into an independent profession. In China, pyrotechnicians were respected for their knowledge of complex techniques in mounting firework displays.
During the Song Dynasty (960–1279), many of the common people could purchase various kinds of fireworks from market vendors, and grand displays of fireworks were also known to be held. In 1110, a large fireworks display in a martial demonstration was held to entertain Emperor Huizong of Song (r. 1100–1125) and his court. A record from 1264 states that a rocket-propelled firework went off near the Empress Dowager Gong Sheng and startled her during a feast held in her honor by her son Emperor Lizong of Song (r. 1224–1264). Rocket propulsion was common in warfare, as evidenced by the Huolongjing compiled by Liu Ji (1311–1375) and Jiao Yu (fl. c. 1350–1412). In 1240 the Arabs acquired knowledge of gunpowder and its uses from China. A Syrian named Hasan al-Rammah wrote of rockets, fireworks, and other incendiaries, using terms that suggested he derived his knowledge from Chinese sources, such as his references to fireworks as “Chinese flowers”.
With the development of chinoiserie in Europe, Chinese fireworks began to gain popularity around the mid-17th century. Lev Izmailov, ambassador of Peter the Great, once reported from China: “They make such fireworks that no one in Europe has ever seen.” In 1758, the Jesuit missionary Pierre Nicolas le Chéron d’Incarville, living in Beijing, wrote about the methods and composition on how to make many types of Chinese fireworks to the Paris Academy of Sciences, which revealed and published the account five years later. His writings would be translated in 1765, resulting in the popularization of fireworks and further attempts to uncover the secrets of Chinese fireworks.
Amédée-François Frézier published his revised work Traité des feux d’artice pour le spectacle (Treatise on Fireworks) in 1747 (originally 1706), covering the recreational and ceremonial uses of fireworks, rather than their military uses.