The Sturmgeschütz IV resulted from Krupp's effort to supply an assault gun. As Krupp did not build Panzerkampfwagen IIIs, they used the Panzerkampfwagen IV chassis in combination with a slightly modified Sturmgeschütz III superstructure.
The first known proposal for a Sturmgeschütz on the Panzer IV chassis is in Krupp drawing number W1468 dated February 1943. This initial drawing unitized the outdated Sturmgeschütz Ausf. F superstructure on a Panzer IV chassis 9. This proposal had a sloped front superstructure with a combat weight of 28.26 tons. Krupp abandoned it in February 1943 because it was too heavy. Plans for the StuG IV were halted.
During the Führer Conference of August 19–22, 1943, after the battle of Kursk, Hitler had seen reports of the StuG III outperforming the Panzer IV when used in an infantry support role and tactical defence. Convinced that a tank-hunter version would be superior to the tank version, Hitler planned to switch Panzer IV production to "Panzerjäger IV" production as soon as possible. It was to mount the same 7.5 cm L/70 used for the Panther. Another manufacturer, Vomag built a prototype Panzerjäger IV with 7.5 cm L/48 gun and demonstrated it on October 20, 1943. It was later re-designated as Jagdpanzer IV Ausf. F. As the Jagdpanzer IV was already being produced by Vomag, the StuG IV may not have materialized, had it not been for the major disruption of StuG III production, and the scarce supply of the 7.5 cm L/70 gun designated for the Jagdpanzer IV.
In November 1943, Alkett, the manufacturer of the StuG III, suffered damage in a bombing raid. Alkett produced 255 StuG III in October 1943, but in December production fell to just 24 vehicles. A conference held December 6–7, 1943, addressed possible solutions to this problem. Hitler welcomed the suggestion of taking the StuG III superstructure and mounting it on a Panzer IV chassis. The StuG IV could be more quickly manufactured than the Jagdpanzer IV at the time. This restarted the Sturmgeschütz IV project. This time, the superstructure of the StuG III Ausf. G was mounted on a Panzer IV chassis 7, with a box compartment for the driver added. Combat weight was 23000 kg, lighter than the 23900 kg for the StuG III Ausf. G. On Dec. 16-17, 1943, Hitler was shown the StuG IV and approved it. To make up for the large deficit in StuG III production StuG IV production was now given full support.
From December 1943 to May 1945, Krupp built 1,108 StuG IVs and converted an additional 31 from battle-damaged Panzer IV hulls. While the number is smaller than the 10,000+ StuG III, the StuG IV supplemented and fought along with StuG III during 1944-45, when they were most needed.