Ellis Marsalis, Kermit Ruffins, Irvin Mayfield, Troy “Trombone Shorty” Andrews. Those are just a few of the living legends who keep jazz going strong in the place it all began, New Orleans, Louisiana.

Today, brass bands still invigorate the streets during Mardi Gras, French Quarter jazz clubs deliver the best in live improvisation on any given night, and the Jazz and Heritage Festival brings together the past, present and future of American jazz every spring, proving year after year that New Orleans is still the jazz mecca of the world.

It all started around 1819 in Congo Square, an outdoor space in New Orleans where slaves would congregate on Sundays when they didn’t have to work. According to the Ken Burns documentary Jazz, they would sing, play music and dance, swaying back and forth to the songs of their home countries. Caribbean music from the West Indies mixed with beats from Africa and church melodies from the United States’ south. Meanwhile, in New Orleans theatres, the stages were overtaken by racist minstrel shows, in which white performers sang and danced in blackface to upbeat tunes. And all the while, the sound of the brass marching band provided a soundtrack to the ongoing American Civil War.

When the war ended in 1865, all of these musical styles blended to form a new genre called ragtime, which syncopated the rhythms of previous genres and made songs that everyone wanted to dance to. Around the same time, former slaves from other parts of the American south brought the blues to Louisiana, combining spiritual music from the Baptist church with secular lyrics that told the painful stories of slaves’ lives.

Blues musicians used the trumpets and trombones left over from wartime music to mimic the sound of their voices, literally singing out their pain through their instruments. It made the blues even more mournful, even more poignant and even more cathartic for anyone listening.

When ragtime and the blues came together, it created a completely novel style of music – a truly American art form. In the late 1890s, syncopation joined with soulful melodies, upbeat dance tunes united with the sultry sound of brass instruments, and jazz began to emerge.

Buddy Bolden, an African-American bandleader called “the first man of jazz” by historian Donald M Marquis, was at the forefront of the jazz movement. Bolden played the cornet in dance halls during the day and in the red light district of New Orleans’ Storyville at night. Although no recordings of Buddy Bolden exist today, his music is said to have incorporated the improvisation characteristic of jazz. A heavy drinker with mental health problems, Bolden’s career abruptly ended in 1907, when he was admitted to the Louisiana State Insane Asylum at the age of 30.

Many other African-American jazz legends also rose to popularity in the beginning of the 1900s, wrote jazz critic and historian Ted Gioia in The History of Jazz. Black musicians included Bunk Johnson, Mutt Carey and Joe “King” Oliver, while Creole musicians (Americans who were descendants from white European colonists and their black slave mistresses) included Sidney Bechet, Freddie Keppard and Jelly Roll Morton, who was famous for falsely claiming to have invented jazz. A talented composer of jazz tunes such as Black Bottom Stomp and Grandpa’s Spells, Morton also lied about his birth date to convince contemporaries that he was older and more experienced than he actually was, Gioia wrote. White musicians who started playing jazz included Papa Jack Laine, Sharkey Bonano and Nick LaRocca. More often than not, bands would self-segregate according to race.

Keppard was touring the country with his esteemed band the Original Creole Orchestra when the Victor Talking Machine Company approached him about recording the world’s very first jazz record in 1915. But the cornet player was so worried about other musicians stealing his ideas that he turned down the offer. Instead, a white band called the Original Dixieland Jass Band, led by LaRocca, recorded with the Victor Talking Machine Company in 1917. This came as a major blow to African-American musicians in particular because of LaRocca’s outspoken racism. He claimed that jazz was invented by white musicians and that black musicians would never play as well. "Since jazz music is at the center of the American mythology, it necessarily deals with race. The more we run from it, the more we run into it," said New Orleans native and jazz great Wynton Marsalis in the documentary Jazz,

As historian Gioia wrote, it wasn’t until local musicians left the city for greener economic pastures in Chicago and New York that most gained fame and success. In 1918, musician James Reese Europe took jazz across even greater distances. During World War I, he led an infantry band called The Hellfighters that introduced French and British soldiers to the new American sound. Europe then helped stage the inevitable spread of jazz worldwide.

The most important figure for jazz’s future was the great trumpeter and cornetist Louis Armstrong, whose undeniable talent pulled him out of the wreckage of an impoverished and violent New Orleans neighborhood. Under the tutelage of Joe “King” Oliver, Armstrong went from child prodigy to travelling horn player to illustrious soloist. His impact on the world of jazz can be felt throughout New Orleans and around the world today.

With strong roots in the tradition of improvisation, jazz continues to evolve, collecting accents from Afropop, Latin dance music, eastern classical music, and pretty much every other music it comes into contact with, all while transforming other genres around the world. And so has been the story of jazz, ever since its birth in the vivacious city of New Orleans.

Travelwise is a BBC Travel column that goes behind the travel stories to answer common questions, satisfy uncommon curiosities and uncover some of the mystery surrounding travel. If you have a burning travel question, contact Travelwise.