First there was imagawayaki, an Edo period (1603 to 1868) Japanese dessert and snack sold from food stalls. An imagawayaki was a round cake typically filled with sweet red bean paste, or anko. Other sweet fillings—like custards and preserves—as well as savory fillings—like curry, meat, and vegetables—could also be found.
The exact origin of the iconic taiyaki fish shape is unknown, but it’s said that imagawayaki sellers, from what’s now Tokyo, decided to try making the cakes fish-shaped, since the tai fish is a symbol of luck. The word tai is like the word “medetai,” which means happy or prosperous. This newly shaped snack sold better, and so taiyaki became the norm.