Another popular type of music around the turn of the twentieth century was ragtime. Unlike Tin Pan Alley songs, ragtime was primarily an instrumental genre, typically performed on solo piano. It earned its name from the "ragged" nature of its melodies so called because they featured syncopation, the deliberate displacement of rhythmic accents onto weak beats or offbeats. This technique created a sense of rhythmic tension and unpredictability that was exciting and fresh to early 20th century listeners. The syncopated right-hand melody was layered over a steady, march like rhythm in the left hand in a 2/4 meter, often alternating between bass notes and chords. The contrast between the rhythmically steady left hand and the syncopated, or “ragged,” right hand gave ragtime its signature sound. Ragtime emerged as a hybrid of European march forms, American sheet music traditions, and African American musical innovations, including rhythmic complexity and improvisation.

Ragtime compositions were often structured similarly to military marches, particularly those popularized by John Philip Sousa. John Philip Sousa, known as the “March King,” was born in Washington, D.C. in 1854 to a Portuguese father and a German mother. He joined the U.S. Marine Band as an apprentice at the age of thirteen and eventually rose to become its leader in 1880, significantly enhancing its national reputation during his twelve-year tenure. In 1892, he left the Marine Band to form his own civilian ensemble, the Sousa Band, which became one of the most celebrated touring groups of its time. The Sousa Band performed across the United States and internationally, including multiple European tours and a world tour in 1910 11. Sousa's ability to blend patriotic fervor with accessible musical forms made his compositions especially resonant with American audiences. Beyond his well-known marches, he also composed operettas, waltzes, and songs, though it was his marches that secured his legacy. He composed 136 marches, including “The Stars and Stripes Forever,” which became the official national march of the United States, as well as “The Washington Post March” and “Semper Fidelis.” Sousa composed 136 marches, including “The Stars and Stripes Forever,” which became the official national march of the United States.

A typical march piece followed a multipart form—commonly AABBACCDD—with each letter representing a distinct 16-measure strain or section. The repetition of each section (AA, BB, etc.) provided familiarity and predictability, while the introduction of new strains (C and D) offered contrast and variation. The 'A' and 'B' sections typically introduced strong, march-like themes, while the 'C' section, often referred to as the trio, featured a more lyrical, flowing melody and a modulation to a new key, usually the subdominant. The final 'D' strain often brought back rhythmic intensity or a climactic resolution.

The most prolific and influential composer of piano rags was Scott Joplin, often referred to as the "King of Ragtime." Born in 1867 or 1868 in Texarkana, Texas, to a formerly enslaved father and a free-born Black mother, Joplin was raised in a musical household and became an accomplished pianist. He honed his skills performing in clubs and saloons in Sedalia and St. Louis, Missouri during the 1890s. Joplin’s career took off after he met music publisher John Stark, who began publishing his works. In 1899, Stark agreed to pay Joplin one cent per copy of his composition "Maple Leaf Rag," rather than purchasing the work outright for a flat fee which was an unusual deal for the time. The arrangement paid off: the piece became a national sensation and sold over half a million copies in the following decade, providing Joplin with a steady income and making him one of the first African American composers to gain commercial success on a national scale.

Though he is most famous for his piano rags, Joplin aspired to be recognized as a serious composer of art music. His opera Treemonisha (1910) combined classical forms with African American musical idioms and narratives. Joplin moved to New York to seek a professional staging of the opera, but it remained unperformed in his lifetime. Nevertheless, Treemonisha was revived in 1972 and staged on Broadway in 1975, receiving acclaim for its originality and significance. In recognition of his contributions to American music, Joplin was awarded a posthumous Pulitzer Prize in 1976.

Joplin’s "Maple Leaf Rag" exemplifies the ragtime style. It features a steady left-hand rhythm, sometimes called "stride," with a syncopated melody in the right hand that defines the genre’s "ragged" sound. This syncopation placing rhythmic emphasis on weaker beats was a defining feature of African American music and startled many white listeners at the time, who were unaccustomed to such rhythmic complexity in mainstream compositions.

As ragtime grew in popularity, musicians began "ragging" existing compositions, particularly marches and existing parlor songs. Bands, especially African American groups like those led by James Reese Europe in the 1910s, would take standard marches by composers like John Philip Sousa and add syncopated rhythms and phrasing. This practice of rhythmic reinterpretation was a direct precursor to jazz. In fact, during the early years of jazz, many people used the terms "ragtime" and "jazz" interchangeably. Ragtime bridged the 19th-century traditions of parlor music, military marches, and folk tunes with the innovations of African American rhythm and style, setting the stage for the explosion of jazz in the decades that followed.