As I made my way through the meandering hallways of Tokyo Station, I felt like a pilgrim making a monumental journey, before my actual trip. I was headed to the mecca of ekiben – beloved boxed meals created specifically for long train journeys. Like the crowds bustling around me, I had a train to catch, and my last order of business was to find myself some lunch for the ride.

Ekiben (駅弁), an abbreviation of eki (station) and ben (bento), is a prized, and some would say essential, element of long-distance train travel in Japan. While eating in a local commuter train is frowned upon, travellers on longer rides, such as bullet trains or trains that take reservations, are encouraged to take a meal. Every region, and even specific train stations, has their own unique offerings tied to the local cuisine and culture.

You may also be interested in:
• The truth about Japanese tempura
• Where people eat 80,000 ducks a day
• The city that lives for breakfast

After a few wrong turns, I arrived at Ekiben-ya Matsuri (literally ‘Festival of Ekiben’), which was stocked with stacks of neatly organised boxes, repeatedly shifted and examined by a multitude of frenetic shoppers. I inspected long, plastic containers in the shape of the shinkansen, or bullet train, filled with various vegetables, meats and rice, and countless colourful boxes featuring painted scripts evoking the echo of a lost time. I peered over the backs of fellow shoppers to gather clues about popular offerings, such as the limited edition boxes that herald the arrival of spring. I was shoulder to shoulder with foodies, travellers and those simply seeking furusato no aji (a taste of home), all hoping to find delight among the 200 or so varieties on display. In typically polite Japan, the crowded aisles contained frequent pushes and shoves, indicating that my fellow shoppers, like me, had limited time to shop.

Across the country, travellers rely on train station bento shops to buy their food and drink for a particular train trip, typically with choices tied to the area they’re in. But this shop is different. As well as offering local ekiben from the Tokyo region, Ekiben-ya Matsuri also sells popular options from destinations across the country ­­– from Hokkaido in the north to Kyushu in the south, allowing shoppers to forgo the train trip and jump straight to the prized meal of nearly any region they can imagine. The concept is popular: the shop sells 10,000 such bento-style meals a day, and up to 15,000 on a weekend.

These movable feasts are a beautiful consequence of an efficient, widespread train network married with curious palates yearning to try beloved local specialties. Sampling special regional items from across the country runs deep in Japanese culture. The concept of meibutsu, or ‘famous things’, plays out through two elements of travel: ekiben and omiyage (packaged souvenirs gifted to family and friends). While omiyage is a way to share meibutsu back home, ekiben is a way to enjoy a specialty item yourself.

Steven R McGreevy, who has lived in Japan since 2000, explains that “Japan’s food culture is incredibly diverse and often linked to a particular place. Just the suggestion of somewhere in Japan automatically elicits images of particular foods that are native to the place or of a particular level of refinement or quality. This is, of course, found everywhere in the world, but I would say the level of resolution in Japan is really high: a 30-minute train ride can bring you into a totally different food environment.” 

A 30-minute train ride can bring you into a totally different food environment

Famous examples include gyutan, grilled beef tongue from Sendai; shumai, pork dumplings from Yokohama; and kani-meshi, crab rice from Hokkaido. While many of these items have long been part of the local culinary scene, the idea to box them up as travellers’ fare evolved along with the development of the Japanese railway system, which started service in 1872. The first ekiben appeared in 1885 at Utsunomiya Station (around 130km from Tokyo), consisting of pickled plum rice balls – a portable food common throughout the country.

As no dining car existed in the early days of train travel, merchants would make sales to passengers through the windows or at platform shops. A decade later, stations began offering distinctive tastes of their town, and an industry was born. Today, more than 2,000 kinds of ekiben are available, often from local, family-run businesses.

More than just something to eat, ekiben is another way to experience a locale. Just as you would visit a temple in Kyoto, another must-do is to try Wagyu Bento (or any other of the many famous Kyoto ekiben available) when you leave from Kyoto Station.

5 ekiben to try on your next Japanese rail journey

Masuno Sushi
Toyama Station in Toyama Prefecture, 1,400 JPY

Toyama’s Masuno Sushi is an oshizushi (pressed sushi) meal made of seasonal trout. Boxed in a round bamboo container and wrapped in fresh bamboo leaves, this meal is meant to be cut into wedges like a savoury cake. A specialty of the Jinzugawa River area the dish has a long history, dating to the Heian period (794-1185). This meal has been sold as an ekiben since 1912, with a demand that reflects its impressive legacy. 

Hipparidako Meshi
Nishi-Akashi Station in Hyogo Prefecture, 1,080 JPY

This bento is sold in a brown ceramic pot, created to resemble the local bait vessels, called takotsubo, traditionally used to capture octopus. Inside is a delicious mix of octopus, conger eel, seasonal vegetables and rice. 

Tokyo Bento
Tokyo Station, 1,650 JPY

Tokyo Bento is a beloved meal made up of beef, salmon, vegetable and egg dishes from various gourmet restaurants across the city. From time to time, the included foods get changed up, but this ekiben will always feature the best of Tokyo’s most renowned restaurants.

Daruma Bento
Takasaki Station in Gunma Prefecture, 1,000 JPY

The Takasaki area in Gunma prefecture is famous for its Daruma doll folk art. The container is in the likeness of Bodhidharma, the founder of the Zen sect of Buddhism. He is depicted without limbs and eyelids following an extended period of meditation. After the meal of chicken and and stewed vegetables on chameshi (rice boiled in tea) is finished, the slotted mouth allows the container to be reused as a coin bank.

Sake Harako Bento
Tohoku Region, 1,150 JPY

The Sake Harako bento is an example of an ‘everything’ style meal featuring one ingredient served different ways – in this case salmon, served grilled and flaked, along with rice and salmon roe. This bento takes its cue from harako-meshi, literally ’salmon child rice’, a traditional and beloved autumnal dish from the north-east Tohoku region of Japan.

Hatsuko Matsumoto, who works in Tokyo, adds, “Ekiben can be a kind of memory device of travel... It reminds you when, where and with whom you ate, even after returning home.”

Unlike fast food in the Western world, where price often trumps quality and options tend to be standardised, ekiben thrives on the local elements of its hometown. Heirloom vegetables, unique cooking methods, specialised rice varieties, local crafts and even folktales play a part in an ekiben’s appeal. Seasonality is also important. In his article, Savour Slowly: Ekiben: The Fast Food of High-Speed Japan, Paul Noguchi, former professor of anthropology and sociology at Pennsylvania’s Bucknell University, writes, “A certain vegetable may be in or out of season and a particular species of fish is just beginning or ending its run. Thus ekiben provide the finest local foods available, but always during a particular season, and by doing so combine the best of time and place.”

I had been warned about this – even under the same name, an ekiben’s contents often rotate according to the season. A number of ekiben suggested to me were out of season. Frankly, I was relieved to have my choices whittled down for me ­­– as it were, I had about 100 options too many.

I found help with my decision at the shop’s ekiben showcase wall. Here, the same containers found on the shelves were open to illustrate the contents inside. Unable to read Japanese and not wanting to make the ‘wrong’ choice, I studied my options very carefully.

Noodles, sushi, meat on rice – any conceivable Japanese culinary specialty was there, along with various plastic novelty containers mimicking icons particular to certain areas: a plastic crab containing a bed of famous Tottori crab meat; a snowman evoking the great snows of Niigata, stuffed with minced meat and stewed vegetables on Koshihikari rice. I could see some of the more innovative ekiben packaging, like ones that play a song when the lid is lifted or heat up upon pulling a string (almost all ekiben is served cold, although shops will heat ekiben upon request).

However, the clock was ticking and my train was likely preparing for its departure. My eyes darted between attractive colours and tastes. In the end, childhood nostalgia and the notion of a ‘souvenir’ won out. I boarded my train just in the nick of time, with a can of heated Nescafe coffee and a cute, pink Hello Kitty samurai container filled with teriyaki chicken and rice, which was brought to me all the way from Okayama Station.

I’d found a good meal, and a means to remember my travels, just as the Japanese have done since the dawn of trains. 

Join more than three million BBC Travel fans by liking us on Facebook, or follow us on Twitter and Instagram.

If you liked this story, sign up for the weekly features newsletter called "If You Only Read 6 Things This Week". A handpicked selection of stories from BBC Future, Earth, Culture, Capital and Travel, delivered to your inbox every Friday.