| Licensed Tour Operator

The Ultimate Nairobi Railway Guide: Fascinating History, Heritage, Trainspotting & Visitor Tips

Elizabeth Muriuki
Elizabeth Muriuki Safari Consultant
August 4, 2026 17 min read

Stand on a platform at Nairobi Railway Station and listen carefully. Between the announcements, the rumble of passing trains, and the steady rhythm of commuters beginning their day, it’s easy to overlook the reason this city exists in the first place. More than 125 years ago, there was no Nairobi.

There were no office towers piercing the skyline, no matatus weaving through traffic, and no government buildings overlooking Uhuru Highway. The place where Kenya’s capital now stands was a quiet stretch of highland grassland dotted with seasonal swamps and crossed by clear streams. The Maasai, who grazed their cattle here long before colonial rule, called it Enkare Nyrobi, “the place of cool waters.”

It wasn’t an obvious place to build a city. It became one almost by accident.

In 1899, engineers constructing the Uganda Railway needed somewhere to refuel steam locomotives, repair equipment, and organize supplies before pushing farther inland. They chose this marshy landscape because it had what every railway depended on in the age of steam: abundant water, relatively level ground, and enough space to establish workshops and storage yards.

The depot they built was never meant to last.

Yet almost as quickly as the railway arrived, people followed.

Traders opened shops to serve railway workers. Carpenters, blacksmiths, and merchants recognized new opportunities. Hotels appeared for travellers making the long journey between Mombasa and the interior. Government administrators realized the settlement occupied a strategic position along Britain’s newest transport corridor.

Within a few years, the temporary railway camp had outgrown its original purpose.

Within a few decades, it had become the capital of British East Africa.

Today, Nairobi has grown into one of Africa’s most dynamic cities, but its railway story is far from over. Historic stations still welcome commuters, century-old locomotives are preserved just meters from modern railway lines, and the Standard Gauge Railway has ushered in a new chapter of rail travel in Kenya.

For many visitors, these stories remain hidden behind the city’s busy streets.

This Nairobi Railway Guide uncovers them. From the dramatic construction of the Uganda Railway and the birth of Nairobi to the city’s historic stations, railway museum, modern train services, and places where enthusiasts can appreciate Kenya’s railway heritage, this guide explores the remarkable relationship between a railway and the capital it created.

Before Nairobi: A Landscape of Grasslands, Marshes, and Cool Waters

Every city has a beginning, but Nairobi’s story starts long before the first railway sleeper was laid.

In the late nineteenth century, the area looked nothing like the modern capital. Rolling grasslands stretched towards the horizon, broken by clusters of acacia trees and seasonal wetlands that filled during the rains. Streams flowed through the landscape, attracting wildlife and providing dependable water for both animals and people.

The Maasai used these plains as grazing land, moving their livestock through the area according to the seasons. Nearby communities traded, hunted, and travelled across the region long before maps identified Nairobi as a destination.

The environment itself would later determine the city’s future.

Steam locomotives consumed enormous quantities of water. Every major railway depot required reliable rivers or springs where engines could refill their boilers before continuing their journey. The cool streams around Enkare Nyrobi offered exactly that.

Preserved steam locomotives at Nairobi Railway Museum

Combined with the relatively flat terrain, the location was ideal for a railway maintenance depot. What engineers saw as a practical stopping point would soon become one of the most important urban centres in East Africa.

Looking back today, it is remarkable how much depended on something as simple as geography. Had the water been less reliable or the land more difficult to build on, Kenya’s capital might have emerged somewhere entirely different.

Why Britain Decided to Build the Uganda Railway

To understand why Nairobi exists, we first need to understand why Britain invested in one of the most ambitious railway projects of the nineteenth century.

By the 1890s, the British Empire had established control over the British East Africa Protectorate and wanted a dependable route linking the Indian Ocean with the interior of East Africa. Travelling inland from Mombasa was slow, unpredictable, and physically exhausting. Caravans carried supplies over hundreds of kilometers, often taking weeks or even months to complete journeys that today can be made in hours.

For Britain, a railway offered more than convenience.

It promised faster administration of colonial territories, quicker movement of troops, improved trade, and easier access to Uganda, which was considered strategically important within the Empire. It would also encourage settlement, support agricultural development, and strengthen Britain’s influence across the region.

Construction officially began at Mombasa in 1896.

Workers constructing the Uganda Railway in Kenya during the late nineteenth century

The plan was to build a railway stretching nearly 960 kilometers (597 miles) to Kisumu on the shores of Lake Victoria. From there, passengers and cargo would continue by steamer into Uganda.

At the time, few imagined that one of the railway’s greatest achievements would not be reaching Lake Victoria, but creating an entirely new city along the way.

The Railway That Many Thought Should Never Be Built

Not everyone celebrated the project.

In Britain, members of Parliament questioned whether spending millions of pounds on a railway through unfamiliar territory made economic sense. Newspapers criticized the enormous cost, while opponents argued the line would pass through landscapes that offered little commercial value.

One publication famously dismissed it as “a lunatic line.”

The nickname spread quickly.

Before long, the Uganda Railway had become widely known as the “Lunatic Express.”

The criticism reflected genuine concerns. Engineers faced rivers that required substantial bridges, escarpments that challenged the locomotives of the day, tropical diseases, unpredictable weather, and vast distances where almost no infrastructure existed.

Yet history would judge the railway very differently.

Instead of becoming an expensive failure, it transformed transport across East Africa, stimulated trade, encouraged settlement, and gave rise to towns that continue to shape Kenya today.

Nairobi stands as perhaps the greatest example of that transformation.

The Men Who Built More Than a Railway

Steel rails alone do not create history. People do.

Although the Uganda Railway was conceived by British planners, it was built through the labour of thousands of individuals whose stories are inseparable from Kenya’s own.

Because experienced railway workers were scarce in East Africa, the British government recruited more than 30,000 labourers, artisans, and skilled workers from British India between 1896 and 1901. They crossed the Indian Ocean on crowded ships, leaving behind families and familiar surroundings to work on a project unlike any they had experienced before.

Indian labourers building the Uganda railway

Their days were demanding.

They cleared thick vegetation, levelled uneven ground, laid sleepers, positioned steel rails, built embankments, and assembled bridges across rivers. Work continued under intense coastal heat, chilly highland mornings, heavy rains, and the ever-present threat of tropical diseases.

Many completed their contracts and returned home. Others chose to remain.

Those who stayed established businesses, workshops, and trading enterprises that contributed to the growth of towns along the railway, including Nairobi. Their descendants remain an integral part of Kenya’s multicultural society, and their legacy extends far beyond the tracks they helped construct.

When we speak about the Uganda Railway today, it is important to remember that it was not simply an engineering achievement. It was also the result of thousands of human stories, of ambition, sacrifice, resilience, and opportunity.

Building the Impossible: How the Uganda Railway Crossed East Africa

If the Uganda Railway seems inevitable today, it certainly didn’t in the late nineteenth century.

When construction began in Mombasa in 1896, there was no guarantee the railway would ever reach the interior. The route stretched across nearly 1,000 kilometers of landscapes that had never seen a locomotive. Between the coast and Lake Victoria lay rivers that would need bridging, steep escarpments that would test the limits of steam engines, dense bush, expansive plains, and regions where engineers had little more than rough surveys to guide them.

Even getting construction materials inland was a challenge.

Every rail, bolt, sleeper, and bridge component arrived by ship at Mombasa before being transported as far as the completed track allowed. As the railway advanced, it carried its own future, bringing more steel, timber, machinery, and supplies for the next stretch of line. Progress was slow, but it was relentless.

Temporary camps appeared wherever work was underway. These camps housed engineers, labourers, surveyors, cooks, blacksmiths, carpenters, and medical staff. Some disappeared once construction moved on. Others gradually attracted traders and settlers, evolving into permanent communities.

One of those camps would become Nairobi.

A Railway Built by Thousands of Hands

The Uganda Railway is often remembered for its locomotives and engineering, but neither would have mattered without the people who built it.

To undertake such a vast project, the British administration recruited more than 30,000 skilled and semi-skilled workers from British India. Many had previous experience working on railways and brought expertise that was difficult to find elsewhere in the Empire.

Life on the railway was demanding.

Workers spent long days clearing vegetation, cutting through rock, laying sleepers, assembling bridges, and levelling ground for the tracks. They endured sweltering heat near the coast, cold nights in the highlands, outbreaks of disease, and months away from their families.

The work was physically exhausting, but it also laid the foundations for something much larger than a railway.

When construction ended, many workers returned to India. Others chose to remain in East Africa, establishing businesses and communities that became part of the social and economic fabric of towns such as Nairobi, Mombasa, Nakuru, and Kisumu.

Today, Kenya’s Asian community continues to reflect that shared history, reminding us that the Uganda Railway was not only an engineering achievement but also a meeting point of cultures.

When Lions Brought Construction to a Standstill

Every great railway has its legendary stories, but few are as dramatic as the events that unfolded near the Tsavo River in 1898.

As workers built a bridge across the river, two male lions began entering the construction camps at night. Fear spread quickly through the workforce. Labourers abandoned their tents, work slowed dramatically, and rumours about the lions travelled far beyond East Africa.

The railway’s supervising engineer, Lieutenant Colonel John Henry Patterson, eventually organized a series of hunts to stop the attacks. After months of failed attempts, he succeeded in killing both lions, allowing construction to continue.

One of the lions that was captured after killing more than 130 railway construction workers

The exact number of people killed has been debated ever since. Patterson claimed more than 130 victims, while later scientific studies suggest the total was likely much lower. Whatever the true figure, the attacks became one of the most famous episodes in African history.

More than a century later, the story still captures imaginations. It inspired books, documentaries, and the Hollywood film The Ghost and the Darkness, ensuring that one chapter of Kenya’s railway history reached audiences around the world.

For travellers heading to Tsavo today, it adds another layer to a landscape already celebrated for its elephants, lions, and vast wilderness.

The Depot That Was Never Meant to Become a City

When railway engineers arrived at Enkare Nyrobi in 1899, they weren’t looking for the perfect place to build a capital. They were looking for somewhere practical.

Steam locomotives needed large quantities of water. Workshops required flat ground. Construction teams needed space to store equipment, repair engines, and organize supplies before continuing westward.

The marshy plains checked every box.

A depot was established, complete with maintenance sheds, warehouses, offices, and accommodation for railway workers. On paper, it was simply another operational stop along the Uganda Railway.

But railways have always attracted opportunity.

Traders realized that hundreds of workers needed food, clothing, tools, and everyday supplies. Small shops appeared around the depot. Carpenters and blacksmiths opened workshops. Boarding houses welcomed travellers moving between the coast and the interior. Government officials, recognizing the settlement’s growing importance, began establishing administrative offices nearby. Almost without anyone planning it, a town was taking shape.

Unlike many historic cities that evolved over centuries, Nairobi grew at remarkable speed. The railway created jobs, commerce, and movement, attracting people from across East Africa and beyond. Each new arrival contributed to the settlement’s rapid expansion, turning a temporary camp into one of the region’s busiest centres.

Why Nairobi Became the Capital Instead of Machakos

Few people realize that Nairobi was not the first administrative centre of the British East Africa Protectorate.

That distinction belonged to Machakos, which had served as the colonial headquarters before the railway transformed Nairobi.

So why was the capital moved? The answer lay in logistics.

Machakos was not directly connected to the railway, making communication, transport, and administration more difficult as the rail network expanded. Nairobi, by contrast, sat at the heart of Britain’s most important infrastructure project. Officials, mail, construction materials, and commercial goods all passed through the growing railway town.

As government departments gradually relocated, businesses followed. Banks, warehouses, hotels, and retail stores clustered around the station, reinforcing Nairobi’s position as the colony’s commercial centre.

In 1905, Nairobi officially replaced Machakos as the administrative headquarters of the British East Africa Protectorate. Just two years later, in 1907, it became the protectorate’s capital. The decision changed Kenya’s future.

Had the railway taken a different route, or had another depot proved more suitable, the country’s political and economic centre might have emerged elsewhere.

The Railway Didn’t Just Build a City, It Shaped Its Character

Walk through central Nairobi today, and the railway’s influence is still visible, even if it isn’t always obvious.

The earliest businesses developed because of the steady flow of railway workers, traders, and travellers. Hotels welcomed passengers arriving from Mombasa. Warehouses stored goods transported by rail. Workshops repaired equipment essential to the growing town.

The railway also connected people from different backgrounds in ways East Africa had never experienced before. Africans, Indians, Europeans, and Arabs lived and worked alongside one another, exchanging ideas, skills, cuisines, and traditions that helped shape Nairobi’s cosmopolitan identity. In many ways, the railway became the city’s heartbeat.

It determined where people lived, where businesses opened, and how goods moved through the settlement. Roads were planned around railway operations, neighbourhoods expanded to accommodate workers, and commerce flourished wherever the tracks reached.

More than a century later, modern Nairobi has grown far beyond those original boundaries, but its foundations remain firmly tied to the railway.

Key Moments in Nairobi’s Railway Story

Sometimes, the easiest way to appreciate Nairobi’s transformation is to see how quickly it happened.

Year What Happened
1896 Construction of the Uganda Railway begins in Mombasa.
1898 The Tsavo man-eater attacks interrupt work during construction of the Tsavo River bridge.
1899 The railway reaches Enkare Nyrobi, and a maintenance depot is established.
1901 The Uganda Railway reaches Kisumu on Lake Victoria.
1905 Nairobi replaces Machakos as the administrative headquarters of the British East Africa Protectorate.
1907 Nairobi officially becomes the protectorate’s capital.
1963 Kenya gains independence, and Nairobi becomes the capital of the Republic of Kenya.
1971 The Nairobi Railway Museum opens to preserve the country’s railway heritage.
1977 Kenya Railways Corporation is established.
2017 Passenger services begin on the Standard Gauge Railway between Mombasa and Nairobi.

As the twentieth century progressed, Nairobi continued to evolve, but so did its railways. Steam locomotives eventually gave way to diesel engines, commuter services became increasingly important, and the arrival of the Standard Gauge Railway marked the beginning of a new era in Kenya’s transport network.

For visitors today, that evolution means Nairobi offers something few African cities can: the chance to experience more than a century of railway history in a single day, from preserved steam locomotives and colonial-era stations to modern passenger trains connecting the capital with the coast.

Experiencing Nairobi’s Railway Heritage Today

More than a century after the first locomotive rolled into the marshes of Enkare Nyrobi, the railway remains part of Nairobi’s daily rhythm.

Every morning, commuter trains carry thousands of passengers into the city. Freight trains continue to support trade between the coast and the interior, while the Standard Gauge Railway links Nairobi with Mombasa in just a few hours. Alongside these modern services stand historic stations, preserved locomotives, and museums that tell the story of how the railway transformed Kenya.

For visitors, this means Nairobi is more than the birthplace of a railway town, it is one of the few cities where the past and present of rail travel exist side by side.

The Nairobi Railway Museum: Where Kenya’s Railway Story Lives On

If you only have time to visit one railway attraction in Nairobi, make it the Nairobi Railway Museum.

Located next to the historic Nairobi Railway Station, the museum was established in 1971 to preserve the history of Kenya’s railways and the people who built them. It is not a large museum by international standards, but what it lacks in size it makes up for in significance.

Walking through its galleries is like stepping back into the age of steam.

The reception at Nairobi Railway Museum

Historic photographs document the construction of the Uganda Railway, while old engineering drawings, signaling equipment, station clocks, uniforms, tickets, and communication devices reveal how the railway operated long before the digital age.

Outside, the museum’s collection becomes even more impressive.

Rows of preserved locomotives, maintenance vehicles, and vintage passenger coaches allow visitors to appreciate the scale and craftsmanship of early railway engineering. Some of these engines hauled freight across Kenya for decades, while others transported passengers between Mombasa, Nairobi, Nakuru, and Kisumu during the railway’s golden years.

One of the museum’s most fascinating exhibits is the collection of royal and governor’s coaches, used during official visits by members of the British Royal Family and colonial administrators. They offer a glimpse into a very different era of rail travel, when trains were not only a means of transport but also symbols of prestige and political power.

Unlike many museums where exhibits remain behind glass, the Nairobi Railway Museum invites visitors to stand alongside the locomotives that helped shape the nation. For history lovers, photographers, and railway enthusiasts, it is one of Nairobi’s most rewarding, and often overlooked, attractions.

Nairobi’s Historic Railway Station

A short walk from the museum stands the Nairobi Railway Station, one of the city’s oldest transport landmarks.

Although much of Kenya’s long-distance passenger traffic now uses the Standard Gauge Railway terminus at Syokimau, the station continues to serve commuter rail services and remains an important part of the city’s transport network.

Its significance goes beyond architecture.

This is the area where Nairobi’s earliest businesses took root, where goods arriving from Mombasa were unloaded, and where thousands of travellers first stepped into what would become Kenya’s capital.

Standing here today, it’s easy to imagine the excitement of the early twentieth century, when each arriving train brought merchants, settlers, officials, and families hoping to build new lives in a rapidly growing town.

The Standard Gauge Railway: A New Chapter in Kenya’s Rail Story

While the Uganda Railway shaped Nairobi’s past, the Standard Gauge Railway (SGR) reflects Kenya’s ambitions for the future.

Launched in 2017, the SGR has become one of the country’s most significant transport projects in recent history, connecting Nairobi and Mombasa with modern passenger and freight services.

The journey itself is part of the experience.

SGR is the modern Nairobi railway project

Leaving Nairobi Terminus at Syokimau, the train crosses the Athi Plains before entering the vast landscapes of Tsavo, where passengers often spot elephants, giraffes, zebras, buffalo, and antelope from the comfort of their seats. Elevated sections and wildlife underpasses were incorporated into the railway’s design to reduce disruption to traditional migration routes, an important example of balancing infrastructure development with conservation.

For travellers who prefer to enjoy Kenya’s scenery at a slower pace, the SGR offers an appealing alternative to flying between Nairobi and the coast.

Can You Go Trainspotting in Nairobi?

It might surprise many visitors, but yes.

Although Nairobi is not usually associated with trainspotting in the way that cities like London or Tokyo are, it offers a unique experience because several generations of railway history still operate within the same metropolitan area.

Depending on where you are, you may see commuter trains, freight services, metre-gauge locomotives, or sleek SGR passenger trains, all within a relatively short distance of one another.

For railway enthusiasts, the experience is less about chasing rare locomotives and more about appreciating how different eras of rail transport coexist within one city.

If you plan to photograph or observe trains, always remain in public areas, obey railway regulations, and never enter active tracks or restricted railway property. Some of the best photographs are taken from pedestrian bridges, public roads, or designated viewing areas rather than from railway land itself.

A Walking Journey Through Nairobi’s Railway Heritage

One of the best ways to appreciate Nairobi’s railway story is simply to slow down and explore it on foot.

Begin your morning at the Nairobi Railway Museum, allowing enough time to move through both the indoor galleries and the outdoor collection of locomotives and coaches.

From there, walk to the nearby Nairobi Railway Station to see where generations of passengers have begun and ended their journeys. As you continue through the surrounding streets, you’ll notice how the railway influenced the city’s earliest commercial development. Many of the businesses, warehouses, and administrative buildings in this part of Nairobi owe their existence to the railway that once served as the city’s lifeline.

After lunch in the city centre, make your way to Nairobi Terminus in Syokimau to experience the contrast between colonial-era railways and modern Kenya. Watching an SGR train depart is a reminder that Nairobi’s railway story is still being written.

Why Railways Still Matter in Nairobi

It’s tempting to think of railways only as part of Nairobi’s past, but they continue to play a vital role in the city’s future.

The commuter rail network provides an affordable alternative for thousands of daily passengers, helping to ease pressure on Nairobi’s roads. Freight trains move cargo from the Port of Mombasa to inland destinations, reducing the number of heavy trucks on major highways. Meanwhile, continued investment in railway infrastructure reflects the importance of rail transport in supporting Kenya’s economic growth.

In many ways, the railway continues to do what it has always done, connect people, places, and opportunities.

Frequently Asked Questions

Is the Nairobi Railway Museum worth visiting?

Absolutely. It offers one of the best introductions to Kenya’s railway history and is especially rewarding for visitors interested in history, engineering, photography, or colonial-era heritage.

Can tourists ride the Standard Gauge Railway?

Yes. The SGR operates regular passenger services between Nairobi and Mombasa, making it an enjoyable way to travel between the capital and the Kenyan coast.

How long should I spend at the Nairobi Railway Museum?

Most visitors spend between one and two hours exploring the museum, though railway enthusiasts may wish to stay longer to examine the outdoor exhibits in greater detail.

Is Nairobi good for trainspotting?

While Nairobi is not a dedicated trainspotting destination, it offers enthusiasts the rare opportunity to observe historic meter-gauge operations, commuter rail services, freight trains, and the Standard Gauge Railway within the same city.

Why is Nairobi called the “Railway City”?

Although the nickname is less common today, Nairobi owes its existence to the Uganda Railway. Without the railway depot established in 1899, the city would likely never have developed where it stands today.

Every city has a beginning. For Nairobi, that beginning was not a palace, a harbour, or an ancient kingdom, it was a railway depot built beside cool streams on an open stretch of highland grassland.

What started as a practical stop for steam locomotives became a settlement. The settlement became a town. The town became the capital of Kenya.

That journey can still be traced today, from the historic platforms of Nairobi Railway Station and the preserved locomotives at the Nairobi Railway Museum to the modern Standard Gauge Railway carrying passengers across the country. Together, they tell the story of a city that grew because people dared to build a railway where many believed one should never exist.

Whether you’re a history enthusiast, a railway lover, a photographer, or simply a curious traveller, exploring Nairobi’s railway heritage offers a deeper understanding of the city beyond its famous skyline and bustling streets. It reveals the decisions, ambitions, and people who shaped one of Africa’s most remarkable capitals.

And if you’re planning to discover more of Kenya after exploring Nairobi, there’s no better way to continue the journey than with a safari. At Bison Safaris, we believe every destination has a story waiting to be uncovered. From the railway that gave birth to Nairobi to the breathtaking wildlife, landscapes, and cultures that make Kenya one of Africa’s most unforgettable travel destinations.

Elizabeth Muriuki

Written by Elizabeth Muriuki

Safari Consultant

Elizabeth Muriuki is part of the Bison Safaris team, bringing expert knowledge and passion for wildlife to every safari experience.

Chat with us!

You cannot copy content of this page