After the Pacific of the type IV f, the Baden State Railway ordered the 2-6-2 type IV g for express service on flat and mountainous lines. It was intended for the line between Freiburg and Karlsruhe. The requirements included the ability to haul a 440-tonne train with 70 km/h on an incline of 0.42 percent. Additionally, the locomotives had to attain a top speed of at least 110 km/h in trial runs.
The IV g was a four-cylinder compound and resembled the Maffei design of the IV f, although it was built in Karlsruhe. It had a bar frame and the leading axle was a simple Adams axle, what negatively impacted the running characteristics at speed. The boiler used a Clench steam dryer, what was less effective than the Schmidt superheater that had already established itself at this time.
These locomotives were approved for 100 km/h. However, with their driver diameter of only 1,700 mm, they were not very suited for longer runs with high speeds. After the First World War, the state railroad did not mind having to hand over the five locomotives to the État in France. Even the État wanted to sell them back to Germany, but they refused. They were withdrawn in the early thirties.