It was originally designed by Sergey Vladimirovich Ilyushin and his team at the Central Design Bureau in 1938, as a two-seat aircraft with an armored shell protecting crew, engine, radiators, and the fuel tank. However, this was rejected in favor of a lighter single-seat design, which first flew October 12, 1940.
This version was officially designated Il-2, and started large-scale production in early 1941, with the first deliveries coming in May, just in time for the German invasion. The Il-2 proved itself to be a deadly weapon against German transport and armor, but was itself vulnerable to fighter attack, and so in February 1942 the two-seat design was revived.
The two-seat version was called IL-2M, and differed by having a rear gunner's position under a lengthened canopy. These modified versions started appearing in September 1942, and eventually existing single-seaters were modified also. Later changes included an upgrade from 20-mm to 23-mm cannons, aerodynamic improvements, use of wooden outer wing panels instead of metal, and increased fuel capacity.
In 1943 the IL-2 Type 3 or Il-2m3 came out with redesigned wings that were swept back 15 degrees on the outer ends. Performance and handling were much improved, and this became the most common version of the Il-2.
After the war the Il-2 could be found in service with several Eastern European countries for some years.
An improved version, the Il-10, was used in the Korean War.