Due to its proximity with China, Japan had long been familiar with gunpowder weaponry. Firearms seem to have first appeared in Japan around 1270, as primitive metal tubes invented in China and called teppō (鉄砲 lit. "iron cannon") seem to have been introduced in Japan as well.
These weapons were very basic, as they had no trigger or sights, and could not bear comparison with the more advanced European weapons which were introduced in Japan more than 250 years later.
The first documented introduction of the matchlock which became known as the tanegashima was through the Portuguese in 1543. The tanegashima seems to have been based on snap matchlocks that were produced in the armory of Malacca in Portuguese Malacca, which was captured by the Portuguese in 1511. The name tanegashima came from the island where a Chinese junk with Portuguese adventurers on board was driven to anchor by a storm. The lord of the Japanese island Tanegashima Tokitaka (1528–1579) purchased two matchlock muskets from the Portuguese and put a swordsmith to work in copying the matchlock barrel and firing mechanism. Within a few years the use of the tanegashima in battle forever changed the way war was fought in Japan. From 1560, firearms were used in large battles in Japan. In his memoirs published in 1614, the Portuguese adventurer turned author Fernão Mendes Pinto placed himself in that first landing party, although this claim has been roundly discredited and in fact contradicts his claims to be simultaneously in Burma at the time. However, Pinto does appear to have visited Tanegashima soon thereafter.
Japan was at war during the Sengoku Period between 1467 and 1590, as feudal lords vied for supremacy. Matchlock guns were used extensively and had a decisive role in warfare. In 1549, Oda Nobunaga ordered 500 matchlocks to be made for his armies. The benefits of firearms were still relatively questionable however compared to other weapons. At the time, guns were still rather primitive and cumbersome. According to one estimate in 16th century Japan, an archer could fire 15 arrows in the time a gunner would take to load, charge, and shoot a firearm. Effective range also was only 80 to 100 meters, and at that distance, a bullet could easily bounce off armour. Furthermore, matchlocks were vulnerable to humid or rainy conditions as the powder would become damp. However, firearms could be manned effectively by farmers or non-samurai low-ranking soldiers.
The Japanese soon worked on various techniques to improve the effectiveness of their guns. They developed serial firing technique to create a continuous rain of bullets on the enemy. They also developed bigger calibers to increase lethal power. Protective boxes in lacquerware were invented to be able to fire matchlocks in the rain, as well as systems to accurately fire weapons at night by keeping fixed angles thanks to measured strings.
As a result, in the year 1567, Takeda Shingen announced that "Hereafter, the guns will be the most important arms. Therefore, decrease the number of spears per unit, and have your most capable men carry guns". At the Battle of Nagashino in 1575, 3,000 arquebusiers helped win the battle, firing by volleys of 1,000 at a time, and concealed across a river and breastwork to effectively stop enemy infantry and cavalry charges while being protected.
Japan became so enthusiastic about the new weapons that it possibly overtook every European country in absolute numbers produced. Japan also used the guns in the Japanese invasion of Korea in 1592, in which about a quarter of the invasion force of 160,000 were gunners. They were extremely successful at first and managed to capture Seoul just 18 days after their landing at Pusan.
The internal war in Japan was won by Tokugawa Ieyasu, who established the Tokugawa Shogunate, a powerful entity that would maintain peace and prosperity in Japan for the following 250 years. From the mid-17th century, Japan decided to close itself to interaction with the West through its policy of Sakoku. Guns were used less frequently because the Edo Period did not have many large-scale conflicts in which a gun would be of use. Oftentimes the sword was simply the more practical weapon in the average small-scale Edo Period conflicts, nevertheless there were gunsmiths in Japan producing guns through the Edo Period.
A few Japanese started to study and experiment with recent Western firearms from the beginning of the 19th century especially as a means to repel the visits of foreign ships, such as the incursion by British frigate HMS Phaeton in 1808. Through the process of rangaku (the studying of Western science through the Dutch), airguns were developed by Kunitomo Ikkansai c. 1820–1830. From 1828, experiments were made with flintlock mechanisms.
The Nagasaki samurai Takashima Shūhan (高島秋帆) started to import flintlock guns from the Netherlands known as "Gewehr" from the 1840s. He made the first modern Western military demonstration for the Tokugawa Shogunate, in Tokumarugahara (north of Edo) on 27 June 1841.
With the arrival of Commodore Perry in 1854 and the inescapable opening of the country to trade, rapid efforts were made at reequipping Japan with modern fireams. Old matchlock weapons were recovered and converted to flintlock mechanisms.
The mounting civil war in Japan and the opposition of various feudal lords against the Bakufu during the Late Tokugawa Shogunate led to serious rearming until the 1867 Boshin War. At the same time, technological progress was extremely fast in the West, with the introduction of the rifle, breech-loading and even repeating firearms, so that Japanese armies were equipped with composite technologies, with weapons imported from countries as varied as France, Germany, The Netherlands, Britain and the United States, and coexisting with traditional Tanegashima guns.
During the Boshin War, most Shogunate vassal troops used Gewehr smoothbore guns. These guns were rather ancient and had limited capabilities, with an effective lethal range of about 50 meters, and a firing rate of about two rounds per minute. Much more effective Minié rifles were also used by the armies directly under the command of the shogun, the Bakufu troops. The Daimyo of Nagaoka, an ally of the shogun, possessed two Gatling guns and several thousand modern rifles. The Shogunate is known to have placed an order for 30,000 modern Dreyse needle guns in 1866 (citation needed). In 1867, orders were placed for 40,000 state-of-the-art French Chassepot rifles, a part of which reached Edo by year's end. Antiquated Tanegashima matchlock guns are also known to have been used by the Bakufu however.
Imperial troops mainly used Minié rifles, which were much more accurate, lethal, and had a much longer range than the smoothbore Gewehr guns, although, being also muzzle-loading, they were similarly limited to two shots per minute. Improved breech-loading mechanisms, such as the Snider, developing a rate of about ten shots a minute, are known to have been used by troops of the Tosa Domain against the Shogunate's Shōgitai, at the Battle of Ueno in July 1868. In the second half of the conflict, in the northeast theater, Tosa Province troops are known to have used American-made Spencer repeating rifles. American-made handguns were also popular, such as the 1863 Smith & Wesson Army No 2, which was imported to Japan by the Scottish trader Thomas Blake Glover and used by the Satsuma forces.
For some time after the Meiji Restoration, Japan continued to use imported weapons. The newly created Imperial Japanese Army used firearms intensively against more traditional samurai rebellious forces during the Satsuma rebellion in 1877, with an average of 320,000 rounds of ammunition fired daily during the conflict. After the Satsuma rebellion, Japan relied extensively on the French Chassepot.
Japan finally developed its own model, the Murata rifle, derived from the French Fusil Gras mle 1874. This was Japan's first locally made service rifle, and was used from 1880 to 1898. An industrial infrastructure, such as the Koishikawa arsenal had to be established to produce such new weapons.
Later, Japan developed the very successful bolt action Arisaka series rifles, which was the Japanese service rifle until the end of World War II. Japan produced relatively few submachine guns during World War II, the most numerous model was the Type 100 submachine gun of which 24,000-27,000 were produced, compared, for example, with the British Sten of which millions were produced. During the war, the Japanese worked on a copy of the American semi-automatic M1 Garand (the Type 5 rifle) but only a few hundred were made before the end of the war and it did not enter service.
After the end of the war, the dissolution of the Imperial Japanese Army, and the establishment of the Japan Self-Defense Forces in 1947, Japan relied on M1 Garand rifles provided by the United States. In the mid-1950s however, Japan's Defense Agency started to develop battle rifles of its own, such as the Howa Type 64 and assault rifles like the Howa Type 89 which has been gradually replacing the former.