Shortly before the First World War, the Great Eastern was looking for a replacement for the existing 4-4-0 locomotives, which were to pull the heavy express trains over the Great Eastern Main Line to the North Sea, especially during the holiday season. Due to the low permitted axle load, it was not possible to build a more powerful 4-4-0 locomotive, which is why the choice fell on a ten-wheeler. Since space on the existing turntables was also limited, Steven Dewar Holden developed the locomotive with a particularly short wheelbase. It had a Belpaire firebox and was the Great Eastern's first locomotive with piston valves.
A first production lot of 39 engine was built between 1911 and 1915 in the Great Eastern's own workshops in Stratford. Two more were not completed until 1917 due to the war. Ten more were made in Stratford in 1920 and 20 at Beardmore between 1920 and 1921. After the grouping, the LNER placed another order with Beyer, Peacock in 1928 for ten examples of the class now known as B12. This can be explained by the fact that the development of the B17 “Sandringham” class was delayed and the development of a new 2-6-4T was discontinued and reinforcement was needed promptly.
The ACFI feedwater heater was later tested on some engines, but these were later removed. The locomotives originally had the Westinghouse air brakes that were used on the GER. The ten newest engines were already equipped with vacuum ejectors ex works and others were retrofitted. In addition, the last ten got a Lentz valve gear, which was also retrofitted to six more. These were referred to by the LNER as B12/2, but the Lentz valves were later exchanged for the original piston valves in all of them.
When new, heavier locomotives became available on the network of the former GER, a total of 25 B12s were relocated to Scotland between 1931 and 1942. With the low axle loads permitted there, they could now pull heavier trains. From 1932, the locomotives remaining in England received a larger boiler with a conventional firebox and thus became the B12/3. Since these boilers would have been too heavy for the Scottish network, the locomotives there received a slightly lighter boiler between 1942 and 1946, after which they were designated B12/4.
During the Second World War, suitable locomotives with Westinghouse brakes were required for hospital trains that were also to be used on the European mainland. The B12 was selected for this, which could also be used freely due to its low axle load. When British Railways was founded, 72 of the 81 examples were still in existence. In the years that followed, only a few engines were retired, but their number decreased rapidly in the years 1957 to 1959 until only the 61572 was available. It was retired and preserved in 1961, so today it again carries her LNER number 8572 and belongs to the North Norfolk Railway.