Late 1800s
One of the first examples of bicycles modified specifically for off-road use is the expedition of Buffalo Soldiers from Missoula, Montana, to Yellowstone in August 1896.1900s–1960s
Bicycles were ridden off-road by road racing cyclists who used cyclocross as a means of keeping fit during the winter. Cyclo-cross eventually became a sport in its own right in the 1940s, with the first world championship taking place in 1950.

The Rough Stuff Fellowship was established in 1955 by off-road cyclists in the United Kingdom.

In Oregon in 1966, one Chemeketan club member, D. Gwynn, built a rough terrain trail bicycle. He named it a "mountain bicycle" for its intended place of use. This may be the first use of that name.

In England in 1968, Geoff Apps, a motorbike trials rider, began experimenting with off-road bicycle designs. By 1979 he had developed a custom-built lightweight bicycle which was uniquely suited to the wet and muddy off-road conditions found in the south-east of England. They were designed around 2 inch x 650b Nokian snow tires though a 700x47c (28 in.) version was also produced. These were sold under the Cleland Cycles brand until late 1984. Bikes based on the Cleland design were also sold by English Cycles and Highpath Engineering until the early 1990s.

1970s–1980s
There were several groups of riders in different areas of the U.S.A. who can make valid claims to playing a part in the birth of the sport. Riders in Crested Butte, Colorado, and Mill Valley, California, tinkered with bikes and adapted them to the rigors of off-road riding. Modified heavy cruiser bicycles, old 1930s and '40s Schwinn bicycles retrofitted with better brakes and fat tires, were used for freewheeling down mountain trails in Marin County, California, in the mid-to-late 1970s. At the time, there were no mountain bikes. The earliest ancestors of modern mountain bikes were based around frames from cruiser bicycles such as those made by Schwinn. The Schwinn Excelsior was the frame of choice due to its geometry. Riders used balloon-tired cruisers and modified them with gears and motocross or BMX-style handlebars, creating "klunkers". The term would also be used as a verb since the term "mountain biking" was not yet in use. The first person known to fit multiple speeds and drum brakes to a klunker is Russ Mahon of Cupertino, California, who used the resulting bike in cyclo-cross racing. Riders would race down mountain fire roads, causing the hub brake to burn the grease inside, requiring the riders to repack the bearings. These were called "Repack Races" and triggered the first innovations in mountain bike technology as well as the initial interest of the public (on Mt. Tamalpais in Marin CA, there is still a trail titled "Repack"—in reference to these early competitions). The sport originated in California on Marin County's Mount Tamalpais.

It was not until the late 1970s and early 1980s that road bicycle companies started to manufacture mountain bicycles using high-tech lightweight materials. Joe Breeze is normally credited with introducing the first purpose-built mountain bike in 1978. Tom Ritchey then went on to make frames for a company called MountainBikes, a partnership between Gary Fisher, Charlie Kelly and Tom Ritchey. Tom Ritchey, a welder with skills in frame building, also built the original bikes. The company's three partners eventually dissolved their partnership, and the company became Fisher Mountain Bikes, while Tom Ritchey started his own frame shop.

The first mountain bikes were basically road bicycle frames (with heavier tubing and different geometry) with a wider frame and fork to allow for a wider tire. The handlebars were also different in that they were a straight, transverse-mounted handlebar, rather than the dropped, curved handlebars that are typically installed on road racing bicycles. Also, some of the parts on early production mountain bicycles were taken from the BMX bicycle. Other contributors were Otis Guy and Keith Bontrager.

Tom Ritchey built the first regularly available mountain bike frame, which was accessorized by Gary Fisher and Charlie Kelly and sold by their company called MountainBikes (later changed to Fisher Mountain Bikes, then bought by Trek, still under the name Gary Fisher, currently sold as Trek's "Gary Fisher Collection"). The first two mass-produced mountain bikes were sold in the early 1980s: the Specialized Stumpjumper and Univega Alpina Pro. In 1988, The Great Mountain Biking Video was released, soon followed by others. In 2007, Klunkerz: A Film About Mountain Bikes was released, documenting mountain bike history during the formative period in Northern California. Additionally, a group of mountain bikers called the Laguna Rads formed a club during the mid eighties and began a weekly ride, exploring the uncharted coastal hillsides of Laguna Beach, California. Industry insiders suggest that this was the birth of the freeride movement, as they were cycling up and down hills and mountains where no cycling specific trail network prexisted. The Laguna Rads have also held the longest running downhill race once a year since 1986.

At the time, the bicycle industry was not impressed with the mountain bike, regarding mountain biking to be short-term fad. In particular, large manufacturers such as Schwinn and Fuji failed to see the significance of an all-terrain bicycle and the coming boom in 'adventure sports'. Instead, the first mass-produced mountain bikes were pioneered by new companies such as MountainBikes (later, Fisher Mountain Bikes), Ritchey, and Specialized. Specialized was an American startup company that arranged for production of mountain bike frames from factories in Japan and Taiwan. First marketed in 1981, Specialized's mountain bike largely followed Tom Ritchey's frame geometry, but used TiG welding to join the frame tubes instead of fillet-brazing, a process better suited to mass production, and which helped to reduce labor and manufacturing cost. The bikes were configured with 15 gears using derailleurs, a triple chainring, and a cogset with five sprockets.
When did mountain biking start?
Mountain biking as a sport came into existence in various areas in the USA in the late 1970s and early 1980s.  While many groups of riders in different US locations claim the birthright to mountain biking, it's clear that there wasn't a single person nor a single location that served as the starting point for the sport.  Riders in Crested Butte, CO, Marin County, CA, Mill Valley, CA, Cupertino, CA, and several other locations contributed significantly to the birth of the sport.

It wasn't until the late 1970s and early 1980s that bicycle companies began manufacturing mountain bikes with specific high-tech lightweight materials that popularized the sport.  Joe Breeze (Marin County) is often credited with building the first, purpose-built mountain bike in 1978.

It's important to note that there were mountain bike concepts and prototypes built well before this period, with the earliest concept belonging to the off-road bicycles used by the Buffalo Soldiers in 1896.