Despite its name, it is in fact a cake, and not a pie. The dessert acquired its name when cakes and pies were cooked in the same pans, and the words were used interchangeably. In the latter part of the 19th century, this type of cake was variously called a "cream pie", a "chocolate cream pie", or a "custard cake".
Owners of the Parker House Hotel in Boston claim that the Boston cream pie was first created at the hotel by Armenian-French chef M. Sanzian in 1856. Called a "Chocolate Cream Pie", this cake consisted of two layers of French butter sponge cake filled with crème pâtissière and brushed with a rum syrup, its side coated with crème pâtissière overlain with toasted sliced almonds, and the top coated with chocolate fondant. However, historians dispute this claim to primacy; while this cake may have been served then, there is no specific contemporaneous evidence of it, and custard-filled cake was already popular at that time.
The cake is likely derived from the Washington pie, a two-layer yellow cake filled with jam and topped with confectioner's sugar, for which pastry cream of custard eventually replaced the jam, and a chocolate glaze replaced the confectioner's sugar. Today, the cake is topped with a chocolate glaze (such as ganache) and sometimes powdered sugar or a cherry.
The name first appeared in the 1872 Methodist Almanac. Another early printed use of the term "Boston cream pie" occurred in the Granite Iron Ware Cook Book, printed in 1878. The earliest known recipe of the modern variant was printed in Miss Parloa's Kitchen Companion in 1887 as "Chocolate Cream Pie".